I get Access Forbidden (Error 403) when setting up new alias

后端 未结 7 1854
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-13 02:02

I\'m running windows 7 and recently installed XAMPP to build a dev environment. I\'m not great with the server side of things so I\'m having some problems setting up an alia

7条回答
  •  粉色の甜心
    2020-12-13 02:43

    This question is old and although you managed to make it work but I feel it would be helpful if I make clear some of points you have raised here.

    First about directory name having spaces. I have been playing with apache2 configuration files and I have discovered that, if the directory name has space then enclose it in double quotes and all problems disappear. For example...

        NameVirtualHost     local.webapp.org
        
            ServerAdmin admin@example.com
            DocumentRoot "E:/Project/my php webapp"
            ServerName local.webapp.org
        
    

    Note the way DocumentRoot line is written.

    Second is about Access forbidden from xampp. I found that default xampp configuration (..path to xampp/apache/httpd.conf) has a section that looks like the following.

        
            AllowOverride none
            Require all denied
        
    

    Change it and make it look like below. Save the file restart apache from xampp and that solves the problem.

        
           Options Indexes FollowSymLinks Includes ExecCGI
           AllowOverride none
           Require all granted
        
    

提交回复
热议问题