Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-27-2004, 08:32 AM   #1
LQ Newbie
Registered: Sep 2003
Location: Romania
Distribution: Linux Mint
Posts: 29

Rep: Reputation: 21
Apache & VirtualHost

I installed Slackware 10 and I want to have 2 virtualhosts on my coomputer.

I give you the settings in httpd.conf wich I thinks are relevant to my problem.


DocumentRoot /var/www/htdocs

<IfModule mod_userdir.c>
    UserDir public_html
    UserDir disabled root


    DocumentRoot /var/www/server2
    ServerName server2
    ErrorLog /var/log/apache/server2_error_log
    CustomLog /var/log/apache/server2_access_log combined
    DirectoryIndex index.php index.html
Now when I access through my browser it shows the page from server2 and the URL in the browser remains the same ( server2 works corectly (when I access http://server2 with my browser the corect page is displayed).

The settings in the DNS are correct. "host server2" gives me the corect IP and host gives the same IP.

What gives? Is the apache wich comes with Slackware broken?
Old 10-27-2004, 08:37 AM   #2
Registered: Oct 2004
Location: Northville, MI
Distribution: Slackware
Posts: 65

Rep: Reputation: 15
I would recommend doing this: Get rid of "ServerName" at the top of your httpd.conf, or make it generic (i.e. something not useful to you). Now, make a VirtualHost entry (and a NameVirtualHost, if its on a different IP address) for What I'm saying is make your definition of "" an explicit virtualhost directive-- just as you are doing with server2. And no, that Apache compile with Slackware most likely isn't broken.
Old 10-27-2004, 03:01 PM   #3
LQ Newbie
Registered: Sep 2003
Location: Romania
Distribution: Linux Mint
Posts: 29

Original Poster
Rep: Reputation: 21
Yes, Thank you, I did what you told me and it works.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
apache + add a VirtualHost linuxtesting2 Linux - Newbie 2 09-03-2005 03:21 AM
Apache -VirtualHost davidhk Debian 7 08-19-2005 12:33 PM
Virtualhost setup on apache 2 notmatt Debian 2 10-28-2004 01:05 PM
Help with Apache <VirtualHost> please. smakkythecamel Linux - Networking 2 06-12-2003 07:15 PM
apache virtualhost jonfa Linux - Networking 5 08-12-2002 06:07 PM

All times are GMT -5. The time now is 04:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration