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

后端 未结 7 1774
爱一瞬间的悲伤
爱一瞬间的悲伤 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
        <VirtualHost local.webapp.org:80>
            ServerAdmin admin@example.com
            DocumentRoot "E:/Project/my php webapp"
            ServerName local.webapp.org
        </VirtualHost>
    

    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.

        <Directory>
            AllowOverride none
            Require all denied
        </Directory>
    

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

        <Directory>
           Options Indexes FollowSymLinks Includes ExecCGI
           AllowOverride none
           Require all granted
        </Directory>
    
    0 讨论(0)
提交回复
热议问题