you dont have permission to access "/" on this server

3 posts / 0 new
Last post
#1 Mon, 04/09/2018 - 22:10
adamjedgar

you dont have permission to access "/" on this server

I have just created a new virtual server and successfully ran the wordpress installer script accepting the default install location (ie mydomain.com/wordpress).

If i enter mydomain.com/wordpress it works,

however, if i type mydomain.com (without also using /wordpress) into a web browser i get the following error

Error 403 Forbidden You dont have permission to access / on this server.

I have gone into file manager and ownership and permissions are as follows;

/home/mydomain/public html (mydomain.com:mydomain.com 750) /home/mydomain/public html/wordpress (mydomain.com:mydomain.com 755)

inside the wordpress directory itself;

ownership is mydomain.com:mydomain.com .

he file permissions as 755 for directories and 644 for htaccess. All other files are 750.

I am a little concerned about the defaults that the virtualmin installer script is using...in the past i have only ever had 2 permissions...755 for directories and 644 for files. Why is virtualmin adding the 750? Is this the problem?

My understanding is that by the public html directory having 750 permissions, the world have zero access to its subfolders? Can someone check the installer script and give me some information on this please?

Wed, 04/11/2018 - 13:58
unborn
unborn's picture

Hi, I think you did install wp in wrong location / folder.. its all covered on wordpress.org site - jump on docs and read about that. - you need to tell wp that it should host it from within that folder as to main domain or install wp directly into your /public_html folder.

Configuring/troubleshooting Debian servers is always great fun

Contact me directly ? GPG/PGP supported!

Wed, 04/11/2018 - 16:33
adamjedgar

Actually it isnt installed in wrong location...i ran the virtualmin installer script and accepted all defaults.

The fix was simple...run wordpress to its own directory as outlined in wordpress codex, but have the .htaccess and index.php reside in the web root directory. That change fixed the problem and allowed acess via domain.com instead of domain.com/wordpress.

I simply assumed that the virtualmin script installer was already setup to do this.

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au