3 Replies - 6866 Views - Last Post: 19 July 2011 - 05:52 PM

#1 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

how to setup a apache mod_vhost_alias config ?

Posted 30 June 2011 - 09:26 AM

I need help on setting up my apache server to use mod_vhost_alias so I can just make new folders and those folders will represent each website I host.

I plan on hosting many websites on my server. So I need a way that the config of new websites is dynamic. I was told I need to use mod_vhost_alias to be able to point to one folder and inside that folder if I make new folders and name it with the domain name. It will automatically setup that domain name with the apache server.

so anyone know any good tutorials that can teach me how to set this stuff up?

Is This A Good Question/Topic? 0
  • +

Replies To: how to setup a apache mod_vhost_alias config ?

#2 supercorey  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 119
  • View blog
  • Posts: 207
  • Joined: 15-February 09

Re: how to setup a apache mod_vhost_alias config ?

Posted 02 July 2011 - 08:49 PM

I found a nice, official tutorial on this very topic the other day!
It isn't exactly simple, per se, but it is the most thorough (and pretty much only) tutorial I have found for this.

http://httpd.apache....host_alias.html

I hope this helps. I'm assuming this will help with what you want to do.
Was This Post Helpful? 0
  • +
  • -

#3 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5355
  • View blog
  • Posts: 27,314
  • Joined: 10-May 07

Re: how to setup a apache mod_vhost_alias config ?

Posted 02 July 2011 - 08:53 PM

There is an example vhost config at the bottom of the http.conf file. Just make certain that your root folder, index file, & error/access log files all exist prior to restarting apache.
Was This Post Helpful? 0
  • +
  • -

#4 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

Re: how to setup a apache mod_vhost_alias config ?

Posted 19 July 2011 - 05:52 PM

View Postno2pencil, on 02 July 2011 - 09:53 PM, said:

There is an example vhost config at the bottom of the http.conf file. Just make certain that your root folder, index file, & error/access log files all exist prior to restarting apache.


I looked at that file. There is no examples. However I found there is another config file that is inside a folder called extra.

in my main server config it shows a commented out line where it uses vhost config file which is inside the extras folder.

In that file I don't know what exactly I need to do. I know I need something like this:

# get the server name from the Host: header
UseCanonicalName Off

# this log format can be split per-virtual-host based on the first field
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon

# include the server name in the filenames used to satisfy requests
VirtualDocumentRoot /www/hosts/%0/docs
VirtualScriptAlias /www/hosts/%0/cgi-bin

I understand what each thing does. the only think I don't quite understand is the log format. and the customlog path.

and I don't understand how it should appear in that special config file inside the folder extras.

any ideas or tutorials that can explain step by step what I need and what it's used for and how it behaves... etc I am totally new to vhosting multiple websites via just adding a folder.

would like to know where this path would be in root:
logs/access_log

that's the custom logs setting above set.

I don't fully understand that config.


sorry ... finally got it to work properly.

Thanks guys.

This post has been edited by hockey97: 19 July 2011 - 10:39 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1