James Monger
James Monger

Reputation: 10685

Set up subdomain in Apache2

I have a folder /var/www/forum in which I have my forum files. I currently access this by going to xyz.com/forum. How can I set up apache to allow me to visit forum.xyz.com to visit the forum?

Upvotes: 0

Views: 96

Answers (1)

Vasia Dunaev
Vasia Dunaev

Reputation: 149

Hope it helps

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/Users/user_name/Sites/site/forum"
    ServerName forum.site.ru
    <Directory "/Users/user_name/Sites/site/forum">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    ErrorLog "/private/var/log/apache2/site_error_log"
    CustomLog "/private/var/log/apache2/site_access_log" common
</VirtualHost>

Thanks

Upvotes: 1

Related Questions