Trouble viewing webpage

Discussion in 'Installation/Configuration' started by methus, Jan 4, 2012.

  1. methus

    methus New Member

    So, I followed the "Prefect Server" guide for Ubuntu 10.04 to a tee. I also added the appropriate DNS zone (an A record @ pointing to my IP address).

    This is my problem:
    When trying to access my website by domain (domain.tld) I get a 403 error stating I do not have permission to view / and the same for the errorDocument. I DO have an index.html file in the /var/www folder though, and it is set for everyone to read. If I try adding www before the domain (www.domain.tld) I can view it just fine.
    When trying to access my website by public IP address, I can view my index.html in /var/www just fine.

    If I add a website via ISPConfig 3 (and it therefore creates a symlink) then I can access the website it creates for me just fine through my domain (domain.tld).

    What's keeping me from accessing my /var/www folder through my domain?
     
  2. cbj4074

    cbj4074 Member HowtoForge Supporter

    This is by design. See:

    Code:
    /etc/apache2/sites-available/ispconfig.conf
    
    Code:
    # Do not allow access to the root file system of the server for security reasons
    <Directory />
        AllowOverride None
        Order Deny,Allow
        Deny from all
    </Directory>
    
     
  3. methus

    methus New Member

    Ok, but why would it allow me to do so using www in front of my domain? It would still be the root directory then.
     
  4. cbj4074

    cbj4074 Member HowtoForge Supporter

    Oh, wait, my bad... that's for the root of the filesystem. Let me dig a little more...

    In the meantime, why not examine your log file while you visit that URL?

    Code:
    # tail -f -n 30 /var/www/example.com/log/error.log
    
     
  5. methus

    methus New Member

    Ok, here's what I want basically...

    I want to be able to type in my domain (domain.tld) and be able to access my site files in /var/www. I can do that currently by typing www first (www.domain.tld), but I don't want to have to do that. That's currently the only way I can access my webmail as well. There's a symlink for my webmail in /var/www, and of course I can't access it with domain.tld/webmail, because my access is denied. I CAN however access is via www.domain.tld/webmail. But, like I said, I don't want to have to use www every time.

    Here's my error log from the ISPConfig 3-made site via /var/www/domain.tld:

    client denied by server configuration: /var/www/domain.tld/web/webmail/index.php
     
    Last edited: Jan 4, 2012
  6. cbj4074

    cbj4074 Member HowtoForge Supporter

    If you're going to use ISPConfig, why not use the website structure that ISPConfig creates?

    In other words, rather than attempting to store your site's files in /var/www, why not store them in /var/www/example.com/web, as ISPConfig expects?

    Or am I misunderstanding you, and your files are already in /var/www/example.com/web?
     

Share This Page