Webpage not visable!

Discussion in 'Server Operation' started by willebanks, Aug 20, 2006.

  1. willebanks

    willebanks New Member

    Howdy all,

    Got a small problem that I'm sure someone else has had but I'll be darned if I can find a solution. I can visit every virtual webpage I am hosting yet I tried to setup a "main" page hosted directly from /var/ww/html and all I get is the Fedora Core test page even when I place a index file in the directory..am I missing something. If I read the docs right once I add an index page the test page should be replaced, yes?

    I know this I am missing something very simple here but I'll be darned if I can figure it out! As usual any help would be appreciated!

    Will Banks
     
  2. themachine

    themachine New Member HowtoForge Supporter

    Hello,

    When using VirtualHosts with Apache, the "default" is the first <VirtualHost...> listed. Therefore, any requests that do not match a VirtualHost will be handled by the first VirtualHost directive.

    Additionally, looking at the error log [such as '/var/log/httpd/error_log'] will likely tell you why the the page is not being served properly.
     
    Last edited: Aug 21, 2006
  3. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /var/www/html
    ?
     
  4. willebanks

    willebanks New Member

    Hi Falko,

    drwxr-xr-x 2 root root 4096 Aug 18 15:19 .
    drwxr-xr-x 13 root root 4096 Aug 11 17:18 ..

    When you suggested this I checked the permissioms on the folder and as you can see, they look about right, unless I'm missing something. I changed the permissions so "I" had ownership not root and I change permissions to "rwx" for everyone and that didn't seem to help...so I changed everything back! Your guess is as good as mine.
    Will
     
    Last edited: Aug 22, 2006
  5. willebanks

    willebanks New Member

    Hi themachine,

    I checked the error.logs and didn't see anything that would poit in the direction of a solution! Thanks for the advice.

    Will
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Edit /etc/httpd/conf.d/welcome.conf and make it look like this:

    Code:
    #
    # This configuration file enables the default "Welcome"
    # page if there is no default index page present for
    # the root URL.  To disable the Welcome page, comment
    # out all the lines below.
    #
    #<LocationMatch "^/+$">
    #    Options -Indexes
    #    ErrorDocument 403 /error/noindex.html
    #</LocationMatch>
    Then restart Apache:
    Code:
    /etc/init.d/httpd restart
    Afterwards, you won't see the standard Fedora page anymore.
     
  7. willebanks

    willebanks New Member

    Sorry this took so long!

    I commented out the stuff like you asked and now I get an 403 error! The funny part is I can see the webpage no problem when I try via the localhost? I did notice that in the httpd.conf file, the DirectoryIndex part doesn't have "index.html" and if I add it I get a shared ip message until I remove it again...this has no effect on any of the other webpages??? Confused...I know I am!

    Will

    Heres a swist..I just tried to access the website via https and it worked...any guesses...hope this new development helps!
     
    Last edited: Sep 1, 2006
  8. falko

    falko Super Moderator Howtoforge Staff

    It seems as if your IP address is denied access somewhere in your Apache configuration. It's also possible that this is caused by SELinux. Please make sure it's off.


    Where di you put your main vhost in the Apache configuration? I guess behind the shared IP vhost. You must put it first - the order matters.

    All vhosts written by ISPConfig come with their own DirectoryIndex line.
     
  9. willebanks

    willebanks New Member

    Hello Falko,

    Thank you for taking the time and holding my hand through all this...

    I could only find one vhost file and it "belongs" to ISPConfig.

    here are the beginning lines:

    NameVirtualHost 192.168.2.100:80
    <VirtualHost 192.168.2.100:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    </VirtualHost>
    I tried change the DocimentRoot and the other settings but I only made matters worse! I also looked around in the httpd.conf file and didn't see anything that might deny the addie. I also checked and rechecked and SELinux is not on. Again...your guess is probably better than mine!

    Will
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Does this line come before or after your main vhost?
     
  11. willebanks

    willebanks New Member

    Falko

    Not sure what you mean...This is the very first entry before the actual virtual webpage entries!
    This get even more interesting...I am trying to learn PHP and for some reason I couldn't get a php test page to work! I made some changes to ISPConfig and now I wish I had written them down.
    I can now see all html files on the main site and everything is working fine on the virtual sites...If I can figure out what I did I will post them in case someone else has the same trouble...oh and I even figured out on my own why the php file wasn't working...I didn't have the "read" permissions set! Who knew?

    Thanks for all the help I'm sure that you and everyone else helped get me in the right direction.

    Will
     
  12. layla

    layla New Member

  13. willebanks

    willebanks New Member

    Layla,

    To be honest I don't know what I did to fix the problem and any way I just re-installed everything because I figured out a way to make sure my "main" page was "hosted"!

    I purchased a different domain name ($8.95 at GoDaddy.com) and I use this new domain name as my FQDN. Because the server now has a different domain name I can host the "main" domain with no problems. I know it seems like a lot of extra work but its just a simple as setting up a ISPConfig Virtual website!

    Hope this helps!
     

Share This Page