Wednesday, 6 February 2013

Apache Interview Questions


Q: – What is location of log files for Apache server ?
Ans- /var/log/httpd
Q: – What are the types of virtual hosts ?
Ans-
a. name-based
b. IP-based.

Name-based virtual host means that multiple names are running on each IP address.
IP-based virtual host means that a different IP address exists for each website served. Most configurations are named-based because it only requires one IP address.
Q: – Command to restart/start Apache web server ?
Ans- service httpd restart/start
Q: – Comamnd to check the version of Apache server ?
Ans- rpm -qa |grep httpd
Q: – What is meaning of “Listen” in httpd.conf file ?
Ans- Port number on which to listen for nonsecure (http) transfers.
Q: – What is Document Root ?
Ans- It is a location of files which are accessible by clients. By default, the Apache HTTP server in RedHat Enterprise Linux is configured to serve files from the /var/www/html/ directory.
Q: – Apache server works on which ports ?
Ans-
http – port 80
https – port 443
Q: – Tell me name of main configuration file of Apache server ?
Ans- httpd.conf
Q: – On which version of apache you have worked ?
Ans- httpd-2.2.3
Q: – What do you mean by a valid ServerName directive?
Ans- The DNS system is used to associate IP addresses with domain names. The value of ServerName is returned when the server generates a URL. If you are using a certain domain name, you must make sure that it is included in your DNS system and will be available to clients visiting your site.
Q: – What is the main difference between and sections?
Ans- Directory sections refer to file system objects; Location sections refer to elements in the address bar of the Web Page.
Q: – What is the difference between a restart and a graceful restart of a web server ?
Ans- During a normal restart, the server is stopped and then started, causing some requests to be lost. A graceful restart allows Apache children to continue to serve their current requests until they can be replaced with children running the new configuration.

-->
apachectl -k restart – for graceful restart
Q: – What is the use of mod_perl module ?
Ans- mod_perl scripting module to allow better Perl script performance and easy integration with the web server.
Q: – If you have added “loglevel Debug” in httpd.conf file, than what will happen ?
Ans- It will give you more information in the error log in order to debug a problem.
Q: – Is it possible to record the MAC (hardware) address of clients that access your server ?
Ans- No

Saturday, 12 January 2013

How to hide your IP address in rhel 6.X / Centos 6.X


How to hide your IP address in rhel 6.X / Centos 6.X



Tor doesn't work as root user so login as a user and extract the tar file and keep it in any directory say /home/ranjith/Downloads

[ranjith@vellore Downloads]$ cd tor-browser_en-US/
[ranjith@vellore tor-browser_en-US]$ ls
App Data Docs Lib start-tor-browser tmp

[ranjith@vellore tor-browser_en-US]$ ./start-tor-browser

Launching Tor Browser Bundle for Linux in /home/ranjith/Downloads/tor-browser_en-US
Qt: Session management error: None of the authentication protocols specified are supported

If your network uses proxy and password click settings > Network and enter your proxy details stop tor and start tor. Now you can connect to internet safely by masking your IP address. Enjoy browsing.