Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 2nd March 2010, 20:24
skyeman skyeman is offline
Junior Member
 
Join Date: Mar 2010
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Question Forbidden Error 403 - Unable to access web pages

On rebuilding an ubuntu "perfect server" 9.10 (Karmic) (ISPConfig-3) mail and web server, after a hdd failure, I'm encountering difficulties serving my web pages. The browser reports either 403 Forbidden errors, or 403 Forbidden and/or 404 Document not Found.

The server error log reports:

[crit] [client xxx.xxx.xxx.xxx] (13)Permission denied: /var/www/mydomain.com/web/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Prior to this error, I was opening pages ok, right up until I used ISPConfig to create a sub-domain with a redirect path instruction. After that, nothing would open at all: http://mydomain.com , http://www.mydomain.com, http://mydomain.com/path-to-subdom-index.html , etc. All of them get 403's now, whereas before using ISPConfig sub-domain tool, those would open content.

It's baffling, because the prior server also used ISPConfig 3 and ubuntu 9.10, and I don't recall encountering these problems.

Any help deeply appreciated...

Elliott
Reply With Quote
Sponsored Links
  #2  
Old 3rd March 2010, 14:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,732 Times in 2,569 Posts
Default

What's the output of
Code:
ls -la /var/www/mydomain.com/web/
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 3rd March 2010, 18:57
skyeman skyeman is offline
Junior Member
 
Join Date: Mar 2010
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Hello, Falco, and thanks for the reply...

ls -la yields:

Code:
root@server1:/var/www/mydomain.com/web# ls -la
total 32
drwx--x--- 4 root root    4096 2010-03-03 12:30 .
drwxr-xr-x 3 root root    4096 2010-01-18 10:10 ..
drwxr-xr-x 2 web1 client0 4096 2010-03-02 18:33 error
-rw-r--r-- 1 web1 client0 1406 2010-03-02 18:33 favicon.ico
-rw-r--r-- 1 web1 client0  683 2010-03-02 18:33 feed.xml
-rw-r--r-- 1 web1 client0    0 2010-03-02 18:33 .htaccess
-rw-r--r-- 1 web1 client0 1861 2010-03-02 18:33 index.html
-rw-r--r-- 1 web1 client0   34 2010-03-02 18:33 robots.txt
drwxr-xr-x 2 web1 client0 4096 2010-03-02 00:30 stats
For http://mydomain.com , this produces:

Forbidden

"You don't have permission to access / on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request." associated with this in the server log:
Code:
[Wed Mar 03 12:40:20 2010] [crit] [client 66.xxx.xxx.xxx] (13)Permission denied: /var/www/mydomain.com/web/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Wed Mar 03 12:40:20 2010] [error] [client 66.xxx.xxx.xxx] File does not exist: /usr/share/apache2/error/403.html
Interestingly, cat .htaccess reveals an empty file. Huh? Can that be right?

The sub-domain structure of the system which had hdd failure was pretty complex, with squirrelmail and four other sub-webs routed by re-directs I built with ispconfig-3. Now, I can't seem to get a handle on getting even the default web to work. I've probably muddled things up a bit with this, but I don't think it will take a complete rebuild. Egad, i hope not...

What next?
Reply With Quote
  #4  
Old 4th March 2010, 18:35
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,732 Times in 2,569 Posts
Default

Try this:
Code:
chmod 755 /var/www/mydomain.com/web
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
skyeman (4th March 2010)
  #5  
Old 4th March 2010, 23:48
skyeman skyeman is offline
Junior Member
 
Join Date: Mar 2010
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Yes, thank you, 'chmod 755 web' removes the 403 error, and permits the default 'Welcome' page to load.

However, as I attempt to add sub-domains using ispconfig-3, the 403 error re-occurs at times. I'm not sure what I'm doing to trigger this. Do you know?

Anyway, I'll keep notes, and I might have other questions for you.

Thanks for pointing me at those pesky permissions.
Reply With Quote
  #6  
Old 5th March 2010, 14:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,732 Times in 2,569 Posts
Default

Can you check if the permissions of the /var/www/mydomain.com/web have changed when the 403 error re-occurs?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 5th March 2010, 17:36
skyeman skyeman is offline
Junior Member
 
Join Date: Mar 2010
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default Observations and testing:

The configuration of mydomain.com, from ispconfig-3 shows all this:
HarddiskQuota:-1, CGI+, SSI+, SuEXEC+, OwnErrorDocs+, AutoSubDomain:*. , SSL+, PHP:Fast-CGI , Active+ .

The core web domain has a Redirect configured, thus: Redirect Type: L, Redirect Path: /subdomain/

Immediately after running: chmod 755 /var/www/mydomain.com/web , I am able to reach the default ispconfig 'welcome' page, as well as the correctly configured subdomain, BUT: If I make any change to core web domain's Redirect tab, and hit save, then I start getting the 403 errors to all pages.

I made this change to the web redirect: http://subdomain.mydomain.com ,(and DNS is properly configured for this subdomain). After modifying the web redirect, looking at the permissions of ~/web, I find them to be 710 (drwx--x---). So, again, I run chmod 755 web, and I'm back to my previous status, where i can reach the default 'welcome', and the subdomain I mentioned.

The web redirect did not seem to work, and I'm unfamiliar with where in the file structure it's making changes. I'm actually trying to get any request for http://mydomain.com and http://www.mydomain.com to instead open http://subdomain.mydomain.com .

So, I modified Auto-Subdomain on the webdomain Website tab to : www.

AGAIN, the permissions at web got changed to 710, with 403 errors. Again, I did chmod 755 web.

Now, there is peace: All (mydomain.com , www.mydomain.com, and subdomain.mydomain.com) are correctly opening my gate-way subdomain page to my webs.

So, why does making changes in the Web Domain Website and Redirect tabs cause a permissions change at /var/www/mydomain.com/web ? Can ( or should) I be able to reconfigure that behavior. Is it a bug, or a feature?

:-)

And where, ideally, in the web file structure, should I be adding back my other subdomains? Will I run into difficulty with Auto-Subdomain set to :.www ? I seem to recall it working when set at .* on the previous server.

I hope these notes make sense, and are helpful. Thanks, as ever, for your fine work with these how-to's, and for the assistance on this problem.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HotSaNIC domino Tips/Tricks/Mods 23 6th November 2006 05:19
Web Issues - Access Forbidden! rytech Installation/Configuration 23 22nd June 2006 15:25
Unable to open ISPConfig Web neu2linux Installation/Configuration 27 25th May 2006 14:09
How to access a web in intranet ? chees Installation/Configuration 2 28th February 2006 11:47
FTP access to web files in ISPConfig Rocky Installation/Configuration 14 8th November 2005 23:17


All times are GMT +2. The time now is 19:49.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.