PDA

View Full Version : Apache2 setup


keyser_soze
13th December 2005, 23:52
I think this is a quick nube question.

I have Debian stable installed and have set up two virtual hosts, one on port 80 and the other a secure site on port 443. Currently, they both point to the same site.

I can access the site if I type www.site.com/index.phtml but www.site.com brings up
www.site.com/apache2-default/

How can I correct this?

Thanks.

till
14th December 2005, 00:24
Please post your vhost configuration.

falko
14th December 2005, 00:43
You can try to change the DirectoryIndex directive in your Apache configuration so that index.phtml comes first, e.g. DirectoryIndex index.phtml index.html ...

Don't forget to restart Apache afterwards.

keyser_soze
14th December 2005, 05:03
Please post your vhost configuration.

I am not sure what you are referring to. Are you asking for the files in sites-enabled?

keyser_soze
14th December 2005, 05:04
You can try to change the DirectoryIndex directive in your Apache configuration so that index.phtml comes first, e.g. DirectoryIndex index.phtml index.html ...

Don't forget to restart Apache afterwards.

Thanks for the suggestion. index.phtml was not in the list. I added it in but the problem is still there. (and yes, I did restart Apache2 afterwards.)

till
14th December 2005, 11:29
I am not sure what you are referring to. Are you asking for the files in sites-enabled?

Yes, if you added the vhost there.

falko
14th December 2005, 12:04
Thanks for the suggestion. index.phtml was not in the list. I added it in but the problem is still there. (and yes, I did restart Apache2 afterwards.)
Did you put index.phtml in the first place?

I am not sure what you are referring to. Are you asking for the files in sites-enabled?If you're on Debian Sarge, then yes, the default vhost is in sites-enabled.

themachine
14th December 2005, 12:41
actually, by default debian does this on the "default" vhost in "/etc/apache2/sites-available/default". You need to either create a separate vhost and leave this default in tact... or just remove the line that looks similar to "Redirect blahbla /apache2-default/" .... err maybe its "Rewrite".... dunno

keyser_soze
14th December 2005, 13:21
or just remove the line that looks similar to "Redirect blahbla /apache2-default/" .... err maybe its "Rewrite".... dunno

BINGO!

Thanks to all for your help!