403 forbidden in subdomain or secondary domain

Started by palts, February 27, 2019, 02:36:55 AM

Previous topic - Next topic

palts

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?

Netino

You must check you log files before you load your .htaccess file, and see for what files they are pointing.

Regards,
Netino

palts

Quote from: Netino 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

Thanks Netino!, what logs specifically?

Netino

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
=================================

palts

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>

studio4host

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.

palts

Quote from: studio4host 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

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