LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-20-2009, 01:30 AM   #1
IKT
LQ Newbie
 
Registered: Aug 2009
Posts: 17

Rep: Reputation: 0
Question Apache: You don't have permission to access /wordpress/ on this server.


Hi.

When i write in the IP of the apache server in webbrowser the default apache page comes up. But when i write xx.xx.xx.xx/wordpress i get You don't have permission to access /wordpress/ on this server.

Heres is the permission on the folder:
Code:
drwxr-xr-x 5 root apache 4096 2009-08-19 16:04 wordpress
Should i defind the wordpress in the httpd.conf to? I have tried it, but dont work.

Can someone help me?
 
Old 08-20-2009, 01:48 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
What happens if you use: http://x.x.x.x/wordpress/index.php
Check the apache error_log for details on this error.

Regards
 
Old 08-20-2009, 03:02 AM   #3
IKT
LQ Newbie
 
Registered: Aug 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
What happens if you use: http://x.x.x.x/wordpress/index.php
Check the apache error_log for details on this error.

Regards
You don't have permission to access /wordpress/index.php on this server.

error_log: [Thu Aug 20 11:04:39 2009] [error] [client 32.53.34.166] (13)Permission denied: access to /wordpress/index.php denied
 
Old 08-20-2009, 03:20 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
What is the output of:
Code:
ls -ld /path/to/wordpress
 
Old 08-20-2009, 03:27 AM   #5
IKT
LQ Newbie
 
Registered: Aug 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
What is the output of:
Code:
ls -ld /path/to/wordpress
drwxr-xr-x 5 root apache 4096 2009-08-19 16:04 /var/www/html/wordpress/
 
Old 08-20-2009, 03:33 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
What distro are you using? Could be a SELinux permissions problem.
 
Old 08-20-2009, 03:58 AM   #7
IKT
LQ Newbie
 
Registered: Aug 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
What distro are you using? Could be a SELinux permissions problem.
It is Fedora 11.
 
Old 08-20-2009, 04:42 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
So it's more likely SELinux.
Running
Code:
ls -Z /var/www/html/wordpress
should tell you if that's the case.
I'm not very familiar with SELinux but after reading a little, I think that yu should run
Code:
chcon -R -h -t httpd_sys_content_t /var/www/html/wordpress
to change the security context.
 
Old 08-20-2009, 04:51 AM   #9
IKT
LQ Newbie
 
Registered: Aug 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
So it's more likely SELinux.
Running
Code:
ls -Z /var/www/html/wordpress
should tell you if that's the case.
I'm not very familiar with SELinux but after reading a little, I think that yu should run
Code:
chcon -R -h -t httpd_sys_content_t /var/www/html/wordpress
to change the security context.
It helped a litle. Now i get Internal servererror when I visit the page:

http://10.22.36.11/wordpress/index.php
http://10.22.36.11/wordpress/
 
Old 08-20-2009, 04:58 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Take a look again at error_log to see if you find more on this error
 
Old 08-20-2009, 05:18 AM   #11
IKT
LQ Newbie
 
Registered: Aug 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
Take a look again at error_log to see if you find more on this error
[Thu Aug 20 12:53:06 2009] [error] [client 32.53.34.166] Directory index forbidden by Options directive: /var/www/html/
 
Old 08-20-2009, 05:19 AM   #12
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Rep: Reputation: 78
There is a virtualhost config like this in your appache configuration files:
Code:
<VirtualHost 111.22.33.44>
    ServerName www.xxxx.com
    DocumentRoot /var/www/html
</VirtualHost>
Here you define the name of your site and the directory which contains the code for your web. Add this to the config file. (the section Directory)
Code:
<VirtualHost 111.22.33.44>
    ServerName www.xxxx.com
    DocumentRoot /var/www/html
    <Directory "/var/www/html/wordpress">
        AllowOverride None
        Options All
        Order allow,deny
        Allow from all
        DirectoryIndex index.php index.html index.htm
    </Directory>
</VirtualHost>
The Options should be not None but All.
Although I have no idea for what do you need this - it worked for me.
NOTE!!
I did not examine what such configuration can cause on your web. Do this on your own responsibility.

Last edited by hua; 08-20-2009 at 05:32 AM.
 
Old 08-20-2009, 05:35 AM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
[Thu Aug 20 12:53:06 2009] [error] [client 32.53.34.166] Directory index forbidden by Options directive: /var/www/html/
This is not the wordpress directory, but your DocumentRoot. Does wordpress work now?
As for the error, you have to add "+Indexes" in the Options directive for the Directory in question and maybe add index.php in the DirectoryIndex line as hua mentioned.
 
Old 08-20-2009, 06:52 AM   #14
IKT
LQ Newbie
 
Registered: Aug 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
This is not the wordpress directory, but your DocumentRoot. Does wordpress work now?
As for the error, you have to add "+Indexes" in the Options directive for the Directory in question and maybe add index.php in the DirectoryIndex line as hua mentioned.
When i typed in http://10.22.36.11/wordpress/wp-install/install.php it came up. But now i have problems with mysql. So i figure out that I install fedora again. I think that is the best thing to do now.
 
Old 08-20-2009, 06:57 AM   #15
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
IMHO you don't have to reinstall the OS. If it's a generic mysql problem post it here, or create another thread for it.
If it's specific to WP, I think that you can read the wordpress documentation on how to add a table in mysql to use it with WP.

Regards
 
  


Reply

Tags
apache, apache2, index, permission, vhost, virtualhost



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission problem with Wordpress Datakraft Linux - Server 7 06-24-2009 04:06 AM
Apache 2.0.47 "Forbidden You don't have permission to access / on this server" wanna13e Linux - Server 18 07-28-2007 02:03 AM
Moved files => Apache: "You don't have permission to access / on this server." teek Linux - Server 1 12-31-2006 04:03 AM
Apache Vhost( You don't have permission to access / on this server.) trekgraham Linux - Software 3 07-08-2004 10:01 AM
You don't have permission to access.. apache ?'s jester_69 Linux - General 3 09-06-2002 07:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration