Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at


hpr1206 :: Resolving Issues (The Vhost Config File)

Windigo helps NYbill set up multiple servers on his VPS by explaining the vhost configuration file

<< First, < Previous, , Latest >>

Thumbnail of Windigo
Hosted by Windigo on 2013-03-18 is flagged as Explicit and is released under a CC-BY-SA license.
apache, web server, server, hosting, mediagoblin, vhosts. 2.
The show is available on the Internet Archive at: https://archive.org/details/hpr1206

Listen in ogg, spx, or mp3 format. Play now:

Duration: 01:03:16

general.

Windigo helps NYbill as he trys to set up mutiple servers on his VPS by explaining the stucture of the vhost file.

NameVirtualHost *:80

#this first virtualhost enables: https://127.0.0.1, or: https://localhost, 
#to still go to /srv/http/*index.html(otherwise it will 404_error).
#the reason for this: once you tell httpd.conf to include extra/httpd-vhosts.conf, 
#ALL vhosts are handled in httpd-vhosts.conf(including the default one),
# E.G. the default virtualhost in httpd.conf is not used and must be included here, 
#otherwise, only domainname1.dom & domainname2.dom will be accessible
#from your web browser and NOT https://127.0.0.1, or: https://localhost, etc.
#

<VirtualHost *:80>
    DocumentRoot "/srv/http"
    ServerAdmin root@localhost
    ErrorLog "/var/log/httpd/127.0.0.1-error_log"
    CustomLog "/var/log/httpd/127.0.0.1-access_log" common
    <Directory /srv/http/>
      DirectoryIndex index.htm index.html
      AddHandler cgi-script .cgi .pl
      Options ExecCGI Indexes FollowSymLinks MultiViews +Includes
      AllowOverride None
      Order allow,deny
      Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin your@domainname1.dom
    DocumentRoot "/home/username/yoursites/domainname1.dom/www"
    ServerName domainname1.dom
    ServerAlias domainname1.dom
    <Directory /home/username/yoursites/domainname1.dom/www/>
      DirectoryIndex index.htm index.html
      AddHandler cgi-script .cgi .pl
      Options ExecCGI Indexes FollowSymLinks MultiViews +Includes
      AllowOverride None
      Order allow,deny
      Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin your@domainname2.dom
    DocumentRoot "/home/username/yoursites/domainname2.dom/www"
    ServerName domainname2.dom
    ServerAlias domainname2.dom
    <Directory /home/username/yoursites/domainname2.dom/www/>
      DirectoryIndex index.htm index.html
      AddHandler cgi-script .cgi .pl
      Options ExecCGI Indexes FollowSymLinks MultiViews +Includes
      AllowOverride None
      Order allow,deny
      Allow from all
</Directory>
</VirtualHost>

Comments

Subscribe to the comments RSS feed.

Comment #1 posted on 2013-03-20 14:35:48 by NYbill

Just a follow up tip. While making changes to MediaGoblin's theme, I would check the site in a browser. But, the changes didn't seem to work.

It didn't dawn on me until I had apache shut down, and was still able to see my site, that I was being shown the page from Firefox's cache.

So, when making changes, remember to clear your browser cache.

Comment #2 posted on 2013-03-22 00:20:18 by CPrompt^

I really enjoyed this episode. It was actually nice to hear the troubles and resolutions and how it all worked. Should do a few more episodes like this. The format was great IMHO!

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Title:
Comment:
Anti Spam Question: What does the letter P in HPR stand for?
Are you a spammer?
What is the HOST_ID for the host of this show?
What does HPR mean to you?