Apache giving 403 forbidden errors

后端 未结 8 1963
终归单人心
终归单人心 2020-11-29 05:06

Ok, so i\'ve previously set up two virtual hosts and they are working cool. they both house simple web projects and work fine with http://project1 and htt

8条回答
  •  爱一瞬间的悲伤
    2020-11-29 05:40

    In my case it was failing as the IP of my source server was not whitelisted in the target server.

    For e.g. I was trying to access https://prodcat.ref.test.co.uk from application running on my source server. On source server find IP by ifconfig

    This IP should be whitelisted in the target Server's apache config file. If its not then get it whitelist.

    Steps to add a IP for whitelisting (if you control the target server as well) ssh to the apache server sudo su - cd /usr/local/apache/conf/extra (actual directories can be different based on your config)

    Find the config file for the target application for e.g. prodcat-443.conf

    RewriteCond %{REMOTE_ADDR}  
    for e.g.
    RewriteCond %{REMOTE_ADDR} !^192\.68\.2\.98
    

    Hope this helps someone

提交回复
热议问题