All pastes #165284 Raw Edit

Virtual Host

public text v1 · immutable
·published 2006-09-09 18:21 UTC
rendered paste body
# httpd.conf

Include /opt/apache2/conf/extra/httpd-vhosts.conf

# extra/httpd-vhosts.conf

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /opt/apache2/htdocs
    ServerName localhost
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /opt/apache2/htdocs/my_project
    ServerName my_project.com
    DirectoryIndex index.html index.php
    <Directory "/opt/apache2/htdocs/my_project">
        AllowOverride All
        Allow from All
    </Directory>
    ErrorLog logs/my_project_error_log
</VirtualHost>