you don't have permission to access [custom alias] on this server

后端 未结 6 1235
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-14 15:00

can anyone help with a following issue: I am using wamp to run projects in my chrome browser. after adding a newAlias which points to my project directory c:/dev/myProject I am

6条回答
  •  醉酒成梦
    2021-02-14 15:55

    Dont change that section of your httpd.conf. Those few lines control access to the root folder of the drive that Apache is installed on. So you just gave full access to anybody with a handy hack.

    The process of securing the access via Apache is to deny all access to everything from the root folder and below, and then selectively allow access for specific sites to specific areas/folders of the drive.

    A better solution would be to change httpd.conf back to how it was and make the change in your Alias definition. Like this :-

    Alias /bs1 "c:/_DEV_/git/NewProject/www/" 
    
    
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Require local         <-- to develop on this PC
        Require ip 192.168.1  <-- to access the server from another PC on your network
        Require all granted   <-- to allow the world to see the beauty of your site
    
    

    It is actually a better idea to use Virtual Hosts to control each site and not Alias's.

    Here is a why and Howto :- WAMPServer 2.5 The Homepage, Your Projects Menu and the need for Virtual Hosts

提交回复
热议问题