• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

403 Forbidden - CentOS 7 - Apache

Status
Not open for further replies.

joesci

Chevereto Member
Website URL
<private>

Chevereto version
3.10.4

Description of the issue
Hey. As far as I know everything should be working. I'm using the full Chevereto as I purchased the core license.

Apache is configured correctly as the Test page was displayed until I commented out all the lines in welcome.conf.

I configured my site using the steps from here as I wasn't familiar with centos syntax.

https://www.rosehosting.com/blog/install-chevereto-on-a-centos-7-linux-vps/

Except I skipped installing Apache and PHP as I already had them. After failing the first time around, I thought maybe I should update Apache and PHP. Tried that, no success.

My files are setup exactly how it is laid out in those steps, with all the relevant IPs replaced with my VPS IP, and the domains replaced with my domain (which has its records correctly configured to point to my VPS IP).

When I attempt to go to the site, I get a 403 forbidden, as I'm sure you can see.
 
Last edited:
Are you sure the file permissions are correct, especially the root folder (public_html or equivalent). That's probably one of the first things you need to check.

Sounds like you are not using a control panel on your VPS? If so, and if you have little experience, then your installation probably needs a lot more input than what was given in that tutorial. PHP and Apache might be installed but they also need configuring. Even if you get Chevereto working your VPS would probably be relatively insecure unless you take additional steps to lock it down.

Consequently would seriously suggest you consider a control panel like cPanel or one of the free alternatives.
 
Are you sure the file permissions are correct, especially the root folder (public_html or equivalent). That's probably one of the first things you need to check.

Sounds like you are not using a control panel on your VPS? If so, and if you have little experience, then your installation probably needs a lot more input than what was given in that tutorial. PHP and Apache might be installed but they also need configuring. Even if you get Chevereto working your VPS would probably be relatively insecure unless you take additional steps to lock it down.

Consequently would seriously suggest you consider a control panel like cPanel or one of the free alternatives.

I tried everything I know how with permissions, apache user has been given permissions etc. I cba with cPanel as I'm just setting this up as a host for me and my friends so we don't have to use larger sites anymore. I know it would be much easier with a panel but the steps I followed should have worked. I got my friend to test the same steps on his debian box (with the correct commands of course) and his worked out fine.

What do you mean by the root folder? I changed the ownership of the chevereto root folder with the following:

chown -R apache:apache /var/www/html/chevereto/

but I did that anyway during setup.

I have heard it could be something to do with SELinux because my box runs CentOS but I know nothing about that.
 
Last edited:
403 means forbidden, is a permission issue in your server. Your web server is not even loading the script, is just responding an error code.

This should help you: https://www.cyberciti.biz/faq/apache-403-forbidden-error-and-solution/

The user + group apache have ownership of var/www (the user and group apache runs under is 'apache' as specified in the config). Apache also has read write and execute permissions of /var/www
I'm pretty sure the CGI step doesn't apply.

in the folder etc/httpd/conf.d/ I have vhosts.d that contains the following:

IncludeOptional vhosts.d/mydomain.co.uk.conf

And in the folder etc/httpd/vhosts.d I have mydomain.co.uk.conf, which contains the following

<VirtualHost (server IP)>
ServerAdmin webmaster@mydomain.co.uk
DocumentRoot "/var/www/html/chevereto"
ServerName mydomain.co.uk
ServerAlias mydomain.co.uk
ErrorLog "/var/log/httpd/mydomain.co.uk-error_log"
CustomLog "/var/log/httpd/mydomain.co.uk-access_log" combined

<Directory "/var/www/html/chevereto/">
DirectoryIndex index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>


I'm totally lost. That should point correctly to the chevereto folder and apache (seems) to have the correct permissions to do so.
 
Last edited:
Code:
[Wed Oct 11 19:59:05.594509 2017] [core:crit] [pid 14494] (13)Permission denied: [client <client>] AH00529: /var/www/html/chevereto/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/chevereto/' is executable, referer: <referer>

Wrong permissions, found in the error_log file.
 
Code:
[Wed Oct 11 19:59:05.594509 2017] [core:crit] [pid 14494] (13)Permission denied: [client <client>] AH00529: /var/www/html/chevereto/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/chevereto/' is executable, referer: <referer>

Wrong permissions, found in the error_log file.

I took a punt and disabled selinux. Looks like that was the problem.

Cheers.

for anyone that encounters this problem (403 despite apache having all the relevant permissions and everything is setup correctly), do the following:

selinuxenabled 0
setenforce 0
 
Status
Not open for further replies.
Back
Top