Setting Multiple Domain / Sub Domain di CentOS 5.5
Using Apache on CentOS is pretty much like using Apache on any other platform. The configuration files are in /etc/httpd/, and the Apache documentation is here. If you have specific questions about something, let us know.
There is a file called httpd.conf in /etc/httpd/conf directory. Uncomment the following:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot /var/www/html
ServerName localhost
ErrorLog logs/localhost-error_log
CustomLog logs/localhost-access_log common
</VirtualHost>
NameVirtualHost enables Name Virtual Hosting. The section for ServerAdmin is a contact email address. DocumentRoot is where your www files are located for this vhost. ServerName is useful for subdomains and such, but I generally use it to name the domain/subdomain/site. ErrorLog and CustomLog directives are usually per vhost, so that they aren’t all logged into the same error/custom log, however, these are going to be where your error and access logs will be stored and written to – make sure the directory/file can be written by the apache user.
loading...
loading...
