Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Jan 03, 2011 2:40 pm 
Offline
Senior Newbie

Joined: Mon Jan 03, 2011 2:34 pm
Posts: 6
I have a Linode with a LAMP environment under Ubuntu 10.04 LTS.

I had my LAMP running with no problems some hours ago, but now, I go to the main domain example.com and I always see the same 403 Forbidden Error.

It had a wordpress blog installed, but now, to test purpose I created a simple index.html with a message to view only if it works.

In my /etc/apache2/sites-available I have a example.com file with that content:

<VirtualHost 173.255.195.124:80>
ServerAdmin other@other.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /srv/www/example.com/public_html/
</VirtualHost>

The directory exists and it have read permissions, etc.

I had reloaded and restarted the apache server several times. I had rebooted the machine also but anything seems work.

I followed your LAMP configuration guidelines and it worked for me, but now it doesn't.

I have every folder under www with read permissions and I don't have any .htaccess to deny the requests. I only have a .html file with a <h1>It works</h1> message.

It might be something about the apache2 main configuration, but I don't have so much knowledge to debug and fix that problem.

Thanks a lot.


Top
   
 Post subject:
PostPosted: Mon Jan 03, 2011 3:06 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
What happens if you go to example.com/index.html

What does ls -l /srv/www/example.com/public_html/index.html show?

Can you show the 403 message from the error log?

Also the real domain would be helpful.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Mon Jan 03, 2011 3:13 pm 
Offline
Senior Newbie

Joined: Mon Jan 03, 2011 2:34 pm
Posts: 6
Thanks, obs

If I go directly to index.html I have the same problem.

The command :

ls -l /srv/www/example.com/public_html/index.html

Gives me

-rw-r--r-- 1 root root 16 Jan 3 17:34 /srv/www/example.com/public_html/index.html

The real domain name is deocultismo [dot] com

I hadn't set any error log at the moment, so I can't view it. I don't know exactly how to do it also.


Top
   
 Post subject:
PostPosted: Mon Jan 03, 2011 3:48 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
The file permissions are fine, to set up error logging add

ErrorLog "path/to/log/file"

In your virtual host. (normally a good place is /var/log/apache/domain.log) make sure whatever user apache runs as can write to the directory where the log is stored

What does ls -dl /srv/www/example.com/public_html/ show? (maybe the directory permissions are wrong)

Set up error logging and see what it says.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Mon Jan 03, 2011 4:09 pm 
Offline
Senior Newbie

Joined: Mon Jan 03, 2011 2:34 pm
Posts: 6
I tried your advices


Last edited by bernabe on Mon Jan 03, 2011 4:13 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Mon Jan 03, 2011 4:11 pm 
Offline
Senior Newbie

Joined: Mon Jan 03, 2011 2:34 pm
Posts: 6
Thanks a lot one more time, you are really helping me.

I had turned on the logging and I have some interesting data on it:

I have several lines with that data:

[Mon Jan 03 20:04:04 2011] [crit] [client 77.208.153.250] (13)Permission denied: /srv/www/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

I don't have a .htaccess file at /srv/www/ because the DocumentRoot folder might be /srv/www/example.com/public_html so I don't know exactly what want to say the error.

The command you said, the ls -dl /srv/www/example.com/public_html/ it outputs:

drwxr-xr-x 2 root root 4096 Jan 3 17:34 /srv/www/example.com/public_html/

I don't see anything that makes me suspect.


Top
   
 Post subject:
PostPosted: Mon Jan 03, 2011 5:20 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
The directory permissions are fine, the .htaccess file looks like a problem.

Are you sure /srv/www/.htaccess doesn't exist?

You could just do

touch /srv/www/.htaccess to create a blank one see if it solves the issue.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Tue Jan 04, 2011 5:03 am 
Offline
Senior Newbie

Joined: Mon Jan 03, 2011 2:34 pm
Posts: 6
Sorry but I created the /srv/www/.htaccess file and with 777 permissions for test purposes and the same error is showed on the error log and the 403 Forbidden in the navigator.

I don't know what to do.

It could be possible to uninstall apache2 and reinstall it with all the configuration removed?

I have my installation with few customization because I installed it two days ago and I don't have anything important on it.

Thanks a lot.


Top
   
 Post subject:
PostPosted: Tue Jan 04, 2011 6:44 am 
Offline
Senior Newbie

Joined: Mon Jan 03, 2011 2:34 pm
Posts: 6
I reinstalled apache and now it works.

Thanks for your help anyway!


Top
   
 Post subject:
PostPosted: Tue Jan 04, 2011 1:47 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Glad you got it fixed! If in doubt hit it with a hammer

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group