Apache configuration


Install Apache rpm file (from Linux installation DVD)
#rpm -ivh httpd-2.0.48-1.2.rpm
Apache to start at boot.
#chkconfig httpd on (may use #setup for text base GUI)
Start Apache service
#/etc/rc.d/init.d/httpd start
Re Start Apache service (Start and Stop)
#/etc/rc.d/init.d/httpd restart
Stop Apache service
#/etc/rc.d/init.d/httpd stop
Check apache status
#/etc/rc.d/init.d/httpd status

——Create users/ownership home folder in Linux—
#useradd peter
#passwd peter
chown -R peter.peter peter
chmod 755 /home/peter
————

Modify httpd.conf file (Apache configuraion file) from #/etc/httpd/conf/httpd.conf
Listen *:80

ServerName 192.100.100.33:80
The ScriptAlias directive has been set to point to /home/www/cgi-bin/ instead of /var/www/cgi-bin/.

Virtual Hositng example:
————————–
ScriptAlias /cgi-bin/ “/home/www/cgi-bin/”
ServerName mystestserver
NameVirtualHost 192.100.100.33:80
<VirtualHost 192.100.100.33:80>
DocumentRoot /home/www/site3
ServerName http://www.first-site.com
</VirtualHost>

<VirtualHost 192.100.100.33:80>
DocumentRoot /home/www/site4
ServerName http://www.second-site.com
</VirtualHost>

Virtual Hositng with custom port example:
——————————————
Server configuration

Listen 8080

NameVirtualHost 192.100.100.33:8080

<VirtualHost 192.100.100.33:8080>
ServerName http://www.first-site.com
DocumentRoot /home/www/site3
</VirtualHost>

(Note: you must configure your fireall to allow port 8080)

Web based tool to manage your Linux machine:
Webmin (www.webmin.com/download.html)
A web-based interface for system administration for Unix. Setup user accounts, DNS, file sharing and the program is freeware.

Advertisements

About Robiul

Robiul has 15 years of continuous successful career experience in ICT with extensive background in System Engineering, IT infrastructure design, operations and service delivery, managing IT projects / MIS functions for local and multi-national companies with in-depth knowledge of multiple operating systems as well as construct / manage small to medium size Data Center. Proven ability to design and implement medium to semi-large scale LAN/WAN/WLAN and system infrastructures. Academic qualification: Master of Science in Information Systems. Professional certifications are: MCSE, CCNA, ITIL and FoundStone Security Professional, VCP, NetAPP, CISSP etc.
This entry was posted in Linux and tagged . Bookmark the permalink.