View Single Post
Old 12-27-2011, 10:57 PM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,519
Quote:
Originally Posted by GFED View Post
if i want to add a line such as "ServerAlias *.example.com" to my httpd.conf, but only to one domain on my server is this possible and where do I create the file?

for example full path to domain public_html is "/usr/home/***username***/domains/***userdomain***.com/public_html"

I'm guessing I just create a file named httpd.conf one level up from public_html but it's not working.


Thanks for any help on this =)
maybe try mod_vhost_alias

something like this

Code:
<VirtualHost *:80>
  ServerName          example.com

  DocumentRoot        /home/user/domains
  VirtualDocumentRoot /home/user/domains/%0/public_html
</VirtualHost>

<VirtualHost *:80>
  ServerName          www
  ServerAlias         www.*

  DocumentRoot        /home/user/domains
  VirtualDocumentRoot /home/user/domains/%2+/public_html
</VirtualHost>
example /home/user/domains/gfy.com/public_html will work by creating a gfy.com/ dir with a subdir of public_html

this will create them on the fly.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


My Cam Feeds Script / Gallery Scraper / WPXXX Theme / Free Templates
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote