logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Two Virtual sites, all I get is " index of/ " page
Author
sabre9532



Joined: 27 Mar 2009
Posts: 3

PostPosted: Fri 27 Mar '09 4:40    Post subject: Two Virtual sites, all I get is " index of/ " page Reply with quote

When I type either of my website address into the browser I first get brought to a "index of/ "page which lists links to my two sites, If I click one then it brings me to the website.

I was under the impression if somebody typed www.somesite.com it would be routed to the correct sites folder?

What did I set up wrong?

Sorry if this has been asked I could not find.

Thanks
Burn
Back to top
acid.-.burn



Joined: 15 Jan 2007
Posts: 17

PostPosted: Fri 27 Mar '09 5:54    Post subject: Reply with quote

do you got it set up something like this


Code:
<Virtualhost *:80>
Servername whatever1.com
DocumentRoot /whatever1
</Virtualhost>

<Virtualhost *:80>
Servername whatever2.com
DocumentRoot /whatever2
</Virtualhost>


& restart your server & delete your broswer cache & reload your page
all should work now
Back to top
sabre9532



Joined: 27 Mar 2009
Posts: 3

PostPosted: Fri 27 Mar '09 16:04    Post subject: Apache 2.2.11 Index of / Reply with quote

I first set installed and set up one site. It works fine. I took a look in the http file and all is good. My "website" folder is in htdocs in the apache folder.

I think the problem is that in the httpd file I have the directory set up pointing to specific website folder???

I then followed the set up instructions off of apache on using virtual host. When I originally opened it there were two created by apache install with my sites name and "dummy" prefixed to it.

I deleted those and then added the virtual host calls:
<VirtualHost *:80>
ServerAdmin webmaster@somename1.com
DocumentRoot "C:/...../htdocs/somename1"
ServerName www.somename1.com
ErrorLog "logs/www.somename1-error.log"
CustomLog "logs/www.somename1.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@somename2.com
DocumentRoot "C:/.../htdocs/somename2"
ServerName www.somename2.com
ErrorLog "logs/www.somename2.com-error.log"
CustomLog "logs/www.somename2.com-access.log" common
</VirtualHost>


Do I have to update the httpd-userdir.conf file ??
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 27 Mar '09 16:39    Post subject: Reply with quote

What is the document root of the main host as set up in httpd.conf
Did you happen to remove the # before the Include conf/extra/httpd-vhosts.conf in the httpd.conf file?
Back to top
sabre9532



Joined: 27 Mar 2009
Posts: 3

PostPosted: Tue 31 Mar '09 17:28    Post subject: Figured it out Reply with quote

I had some issues and then found a document that stepped me through it. I had a couple of small typos.


Thanks for your reply though.
Back to top


Reply to topic   Topic: Two Virtual sites, all I get is " index of/ " page View previous topic :: View next topic
Post new topic   Forum Index -> Apache