0

I have a problem since I update macOS X to high sierra version I have some problem running apache service . When I try to access to this url http://social.demo in local I have Forbidden Page social.demo is a project made with Laravel

When run this command :

apachectl configtest

It return me this error :

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Alexiss-iMac.local. Set the 'ServerName' directive globally to suppress this message
Syntax OK

So I check in /ect/hosts

127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
127.0.0.1 api.demo
127.0.0.1 tv.demo
127.0.0.1 bo.demo
127.0.0.1 social.demo
127.0.0.1 website.demo
127.0.0.1 revive.demo
127.0.0.1 bo.demo
~   

It seems ok I try to uncomment this in this file "/private/etc/apache2/extra/httpd-userdir.conf" and restart apache service

#Include /private/etc/apache2/users/*.conf

Even I try http://localhost I have a forbidden page

I don't where I have to look for ...

Edit : here my httpd-vhost.conf

<VirtualHost *:80>
DocumentRoot "/Users/alexisjqn//Documents/Ctor/public/"
ServerName http://social.demo/
SetEnv APPLICATION_ENV "development"
     <Directory "/Users/alexisjqn//Documents/Ctor/public/">
         DirectoryIndex index.php
         AllowOverride All
         Require all granted
         Order allow,deny
         Allow from all
     </Directory>
</VirtualHost>
LuR
  • 251
  • 1
  • 4
  • 16
  • Not sure but you may check the file/directory permissions. – iamab.in Jul 03 '18 at 14:07
  • @ab_ab I put /Library/WebServer/Documents/index.html.en in 777 with a chown root but same problem ... – LuR Jul 03 '18 at 14:18
  • I mean the [Directory Permissions](https://laravel.com/docs/5.6#configuration) of `storage` and the `bootstrap/cache`. – iamab.in Jul 03 '18 at 15:37
  • @ab_ab drwxrwxrwx 6 alexisjqn staff for both folders – LuR Jul 04 '18 at 09:52
  • The permission issue was my random guess. I don't have much knowledge in this. have a look at [this](https://stackoverflow.com/questions/30639174/file-permissions-for-laravel-5-and-others). It might help you. – iamab.in Jul 04 '18 at 11:07

1 Answers1

0

My Work around was thew following:

  1. Please check "/private/etc/apache2/extra/httpd-userdir.conf" file. Change

    #Include /private/etc/apache2/users/*.conf
    

    to

    Include /private/etc/apache2/users/*.conf
    
  2. And edit your "/etc/apache2/httpd.conf"

    change

    Options FollowSymLinks Multiviews
    

    to

    Options FollowSymLinks Multiviews Indexes
    

    finally your doc root will be look like the following,

    DocumentRoot "/Library/WebServer/Documents"
    <Directory "/Library/WebServer/Documents">
    Options FollowSymLinks Multiviews Indexes
    MultiviewsMatch Any
    AllowOverride All
    Require all granted
    
  3. Restart apache

    sudo apachectl restart
    
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Serdar Mustafa
  • 835
  • 2
  • 9
  • 20