Author Topic: 403 forbidden in subdomain or secondary domain  (Read 17720 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
403 forbidden in subdomain or secondary domain
« on: February 27, 2019, 02:36:55 AM »
Hello, in a fresh installation of CWP the webserver was configured with Nginx & Varnish & Apache (PHP-FPM)

The default domain was configured and wordpress was mounted on it. Everything works OK.

But ... when trying to install wordpress in a subdomain there are problems with the permalinks, showing error 404 and if I load a .htacces file with the wordpress rules, I get error 403 forbidden.

Anyone know what can it be?

Offline
***
Re: 403 forbidden in subdomain or secondary domain
« Reply #1 on: February 27, 2019, 03:13:46 AM »
You must check you log files before you load your .htaccess file, and see for what files they are pointing.

Regards,
Netino

Offline
*
Re: 403 forbidden in subdomain or secondary domain
« Reply #2 on: February 27, 2019, 11:41:35 AM »
You must check you log files before you load your .htaccess file, and see for what files they are pointing.

Regards,
Netino

Thanks Netino!, what logs specifically?

Offline
***
Re: 403 forbidden in subdomain or secondary domain
« Reply #3 on: March 03, 2019, 03:53:53 AM »
The logs of the webserver you are using.
You are using Apache webserver, but although you are using nginx as just a reverse proxy, per si nginx can return code "403" too.

So, I would recommend all of these logs, in this order:
=================================
1) /usr/local/apache/domlogs/domain.error.log
2) /usr/local/apache/domlogs/domain.log
3) /usr/local/apache/logs/error_log
4) /usr/local/apache/logs/access_log
5) /var/log/nginx/error.log
6) /var/log/nginx/access.log
=================================

Offline
*
Re: 403 forbidden in subdomain or secondary domain
« Reply #4 on: March 04, 2019, 12:40:08 AM »
Thank you very much for your help!

Finally I deleted this line in the vhost (apache) in the domain configuration and it worked.  ;D

<Directory "/xx/xx/xx">
   Options -Indexes -FollowSymLinks
   AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>

Offline
*
Re: 403 forbidden in subdomain or secondary domain
« Reply #5 on: March 04, 2019, 10:05:36 AM »
this is a security issue when you remove that config, you have instruction how to do that properly on the cwp wiki

http://wiki.centos-webpanel.com/options-followsymlinks-not-allowed
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: 403 forbidden in subdomain or secondary domain
« Reply #6 on: March 04, 2019, 03:13:42 PM »
this is a security issue when you remove that config, you have instruction how to do that properly on the cwp wiki

http://wiki.centos-webpanel.com/options-followsymlinks-not-allowed

Thanks!!!, it worked perfectly with this fix.