HTTP 403 forbidden error when setting up virtual host for the first time in El Capitan 10.11Apache2 permissions issueRunning two instances of Apache as separate users — permission deniedApache giving me 403 on Virtual HostConfiguring Apache 2.4 to permit CGI on Debian JessieSetting up an HTTP server on two mounted drivesHow to configure local virtual host in apache2 in Ubuntu 16.04CGI with Shell ScriptHow can DYLD_LIBRARY_PATH be unset for launchd processes?Apache can't open file that is a symlinkHow to change group for apache user in Fedora

A reference to a well-known characterization of scattered compact spaces

1960's book about a plague that kills all white people

How to take photos in burst mode, without vibration?

What is going on with Captain Marvel's blood colour?

SSH "lag" in LAN on some machines, mixed distros

prove that the matrix A is diagonalizable

I'm flying to France today and my passport expires in less than 2 months

Fully-Firstable Anagram Sets

How do I write bicross product symbols in latex?

Why can't we play rap on piano?

What exploit are these user agents trying to use?

Stopping power of mountain vs road bike

How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?

Should I tell management that I intend to leave due to bad software development practices?

Does a druid starting with a bow start with no arrows?

Western buddy movie with a supernatural twist where a woman turns into an eagle at the end

Today is the Center

Did Shadowfax go to Valinor?

Watching something be written to a file live with tail

Is it legal for company to use my work email to pretend I still work there?

How can saying a song's name be a copyright violation?

Brothers & sisters

How much of data wrangling is a data scientist's job?

What's the difference between 'rename' and 'mv'?



HTTP 403 forbidden error when setting up virtual host for the first time in El Capitan 10.11


Apache2 permissions issueRunning two instances of Apache as separate users — permission deniedApache giving me 403 on Virtual HostConfiguring Apache 2.4 to permit CGI on Debian JessieSetting up an HTTP server on two mounted drivesHow to configure local virtual host in apache2 in Ubuntu 16.04CGI with Shell ScriptHow can DYLD_LIBRARY_PATH be unset for launchd processes?Apache can't open file that is a symlinkHow to change group for apache user in Fedora






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am setting up a site on my Mac OS El Capitan 10.11.4 (15E65) host machine for the first time, however I get a HTTP 403 forbidden error when accessing crmpicco.dev.



Forbidden
You don't have permission to access / on this server.


/etc/apache2/extra/httpd-vhosts.conf:



<VirtualHost *:80>
DocumentRoot "/Users/crmpicco/Sites/crmpicco.co.uk/"
ServerName crmpicco.dev
</VirtualHost>


/etc/hosts:



127.0.0.1 crmpicco.dev


This is my directory listing:



PiccosMacBook:Sites crmpicco$ pwd
/Users/crmpicco/Sites
PiccosMacBook:Sites crmpicco$ ls -l
total 71488
drwxr-xr-x 12 crmpicco staff 408 18 May 19:06 crmpicco.co.uk


I tried changing the user that Apache is running, but that hasn't solved the issue.



<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
#User _www
#Group _www

User crmpicco
Group staff
</IfModule>


Am I missing something obvious? I have also tried this suggestion (Apache localhost 403 error with Yosemite)










share|improve this question
















bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.





















    1















    I am setting up a site on my Mac OS El Capitan 10.11.4 (15E65) host machine for the first time, however I get a HTTP 403 forbidden error when accessing crmpicco.dev.



    Forbidden
    You don't have permission to access / on this server.


    /etc/apache2/extra/httpd-vhosts.conf:



    <VirtualHost *:80>
    DocumentRoot "/Users/crmpicco/Sites/crmpicco.co.uk/"
    ServerName crmpicco.dev
    </VirtualHost>


    /etc/hosts:



    127.0.0.1 crmpicco.dev


    This is my directory listing:



    PiccosMacBook:Sites crmpicco$ pwd
    /Users/crmpicco/Sites
    PiccosMacBook:Sites crmpicco$ ls -l
    total 71488
    drwxr-xr-x 12 crmpicco staff 408 18 May 19:06 crmpicco.co.uk


    I tried changing the user that Apache is running, but that hasn't solved the issue.



    <IfModule unixd_module>
    #
    # If you wish httpd to run as a different user or group, you must run
    # httpd as root initially and it will switch.
    #
    # User/Group: The name (or #number) of the user/group to run httpd as.
    # It is usually good practice to create a dedicated user and group for
    # running httpd, as with most system services.
    #
    #User _www
    #Group _www

    User crmpicco
    Group staff
    </IfModule>


    Am I missing something obvious? I have also tried this suggestion (Apache localhost 403 error with Yosemite)










    share|improve this question
















    bumped to the homepage by Community 2 days ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















      1












      1








      1








      I am setting up a site on my Mac OS El Capitan 10.11.4 (15E65) host machine for the first time, however I get a HTTP 403 forbidden error when accessing crmpicco.dev.



      Forbidden
      You don't have permission to access / on this server.


      /etc/apache2/extra/httpd-vhosts.conf:



      <VirtualHost *:80>
      DocumentRoot "/Users/crmpicco/Sites/crmpicco.co.uk/"
      ServerName crmpicco.dev
      </VirtualHost>


      /etc/hosts:



      127.0.0.1 crmpicco.dev


      This is my directory listing:



      PiccosMacBook:Sites crmpicco$ pwd
      /Users/crmpicco/Sites
      PiccosMacBook:Sites crmpicco$ ls -l
      total 71488
      drwxr-xr-x 12 crmpicco staff 408 18 May 19:06 crmpicco.co.uk


      I tried changing the user that Apache is running, but that hasn't solved the issue.



      <IfModule unixd_module>
      #
      # If you wish httpd to run as a different user or group, you must run
      # httpd as root initially and it will switch.
      #
      # User/Group: The name (or #number) of the user/group to run httpd as.
      # It is usually good practice to create a dedicated user and group for
      # running httpd, as with most system services.
      #
      #User _www
      #Group _www

      User crmpicco
      Group staff
      </IfModule>


      Am I missing something obvious? I have also tried this suggestion (Apache localhost 403 error with Yosemite)










      share|improve this question
















      I am setting up a site on my Mac OS El Capitan 10.11.4 (15E65) host machine for the first time, however I get a HTTP 403 forbidden error when accessing crmpicco.dev.



      Forbidden
      You don't have permission to access / on this server.


      /etc/apache2/extra/httpd-vhosts.conf:



      <VirtualHost *:80>
      DocumentRoot "/Users/crmpicco/Sites/crmpicco.co.uk/"
      ServerName crmpicco.dev
      </VirtualHost>


      /etc/hosts:



      127.0.0.1 crmpicco.dev


      This is my directory listing:



      PiccosMacBook:Sites crmpicco$ pwd
      /Users/crmpicco/Sites
      PiccosMacBook:Sites crmpicco$ ls -l
      total 71488
      drwxr-xr-x 12 crmpicco staff 408 18 May 19:06 crmpicco.co.uk


      I tried changing the user that Apache is running, but that hasn't solved the issue.



      <IfModule unixd_module>
      #
      # If you wish httpd to run as a different user or group, you must run
      # httpd as root initially and it will switch.
      #
      # User/Group: The name (or #number) of the user/group to run httpd as.
      # It is usually good practice to create a dedicated user and group for
      # running httpd, as with most system services.
      #
      #User _www
      #Group _www

      User crmpicco
      Group staff
      </IfModule>


      Am I missing something obvious? I have also tried this suggestion (Apache localhost 403 error with Yosemite)







      apache-httpd apache-virtualhost






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 21 '16 at 13:01









      Jeff Schaller

      44.6k1162145




      44.6k1162145










      asked May 20 '16 at 12:40









      crmpiccocrmpicco

      3141620




      3141620





      bumped to the homepage by Community 2 days ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 2 days ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Check the Apache error log. If you find messages that say 'client denied by server configuration' then you do not have the corresponding <Directory> block allowing Apache to serve files from /Users/crmpicco/Sites/crmpicco.co.uk/.



          If the error log mentions (13) Permission denied, then it is the OS stopping Apache serving files from that directory (not the Apache configuration itself) and you should look at the permissions of all directories in the path. Remember Apache needs to be able to traverse the whole path, not just the last component.



          If the whole path is ok, then you probably have some form of security software running preventing Apache from serving the files.






          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f284444%2fhttp-403-forbidden-error-when-setting-up-virtual-host-for-the-first-time-in-el-c%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Check the Apache error log. If you find messages that say 'client denied by server configuration' then you do not have the corresponding <Directory> block allowing Apache to serve files from /Users/crmpicco/Sites/crmpicco.co.uk/.



            If the error log mentions (13) Permission denied, then it is the OS stopping Apache serving files from that directory (not the Apache configuration itself) and you should look at the permissions of all directories in the path. Remember Apache needs to be able to traverse the whole path, not just the last component.



            If the whole path is ok, then you probably have some form of security software running preventing Apache from serving the files.






            share|improve this answer



























              0














              Check the Apache error log. If you find messages that say 'client denied by server configuration' then you do not have the corresponding <Directory> block allowing Apache to serve files from /Users/crmpicco/Sites/crmpicco.co.uk/.



              If the error log mentions (13) Permission denied, then it is the OS stopping Apache serving files from that directory (not the Apache configuration itself) and you should look at the permissions of all directories in the path. Remember Apache needs to be able to traverse the whole path, not just the last component.



              If the whole path is ok, then you probably have some form of security software running preventing Apache from serving the files.






              share|improve this answer

























                0












                0








                0







                Check the Apache error log. If you find messages that say 'client denied by server configuration' then you do not have the corresponding <Directory> block allowing Apache to serve files from /Users/crmpicco/Sites/crmpicco.co.uk/.



                If the error log mentions (13) Permission denied, then it is the OS stopping Apache serving files from that directory (not the Apache configuration itself) and you should look at the permissions of all directories in the path. Remember Apache needs to be able to traverse the whole path, not just the last component.



                If the whole path is ok, then you probably have some form of security software running preventing Apache from serving the files.






                share|improve this answer













                Check the Apache error log. If you find messages that say 'client denied by server configuration' then you do not have the corresponding <Directory> block allowing Apache to serve files from /Users/crmpicco/Sites/crmpicco.co.uk/.



                If the error log mentions (13) Permission denied, then it is the OS stopping Apache serving files from that directory (not the Apache configuration itself) and you should look at the permissions of all directories in the path. Remember Apache needs to be able to traverse the whole path, not just the last component.



                If the whole path is ok, then you probably have some form of security software running preventing Apache from serving the files.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 2 '16 at 8:22









                UnbelieverUnbeliever

                31518




                31518



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f284444%2fhttp-403-forbidden-error-when-setting-up-virtual-host-for-the-first-time-in-el-c%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

                    Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

                    NetworkManager fails with “Could not find source connection”Trouble connecting to VPN using network-manager, while command line worksHow can I be notified about state changes to a VPN adapterBacktrack 5 R3 - Refuses to connect to VPNFeed all traffic through OpenVPN for a specific network namespace onlyRun daemon on startup in Debian once openvpn connection establishedpfsense tcp connection between openvpn and lan is brokenInternet connection problem with web browsers onlyWhy does NetworkManager explicitly support tun/tap devices?Browser issues with VPNTwo IP addresses assigned to the same network card - OpenVPN issues?Cannot connect to WiFi with nmcli, although secrets are provided