Apache2 setup

Discussion in 'Server Operation' started by keyser_soze, Dec 13, 2005.

  1. keyser_soze

    keyser_soze New Member

    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.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post your vhost configuration.
     
  3. falko

    falko Super Moderator Howtoforge Staff

    You can try to change the DirectoryIndex directive in your Apache configuration so that index.phtml comes first, e.g.
    Code:
    DirectoryIndex index.phtml index.html ...
    Don't forget to restart Apache afterwards.
     
  4. keyser_soze

    keyser_soze New Member

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

    keyser_soze New Member

    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.)
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, if you added the vhost there.
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Did you put index.phtml in the first place?

    If you're on Debian Sarge, then yes, the default vhost is in sites-enabled.
     
  8. themachine

    themachine New Member HowtoForge Supporter

    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
     
  9. keyser_soze

    keyser_soze New Member

    BINGO!

    Thanks to all for your help!
     

Share This Page