Jump to content

Mod_vhost_alias


loki_22

Recommended Posts

Hi,

 

I need help setting up multiple vhosts. I've read the apache docs, but I'm still having trouble. I've set my dns with a wildcard, so all subdomains are mapped to my web server's IP. I've then setup a vhost as follows...

#example.com
<VirtualHost *:80>

    ServerAdmin [email protected]

    ServerName example.com
    UseCanonicalName Off
    VirtualDocumentRoot "/home/www/%2"
    ErrorLog /var/log/example.com-error_log
    CustomLog /var/log/example.com-access_log common

    DirectoryIndex index.php index.html index.htm

    #PHP Go!
    suPHP_Engine On

</VirtualHost>

 

I'm trying to catch the subdomain and use it to map to a directory. I've already accomplished this with mod_rewrite, but my users much prefer having vanity sub domains.

 

So far any subdomain tries to map to the / directory and it throws a 403.

 

Any help is much appreciated.

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/106195-mod_vhost_alias/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.