/...logs/app.log" could not be opened


#1

Hello,

I’m trying to work with a fresh new slim installation.
here is what I’m using:
Centos 6, PHP 7.0.31, apache2.

I installed composer globally to use “composer” command where I need.

and used this to install slim:

composer create-project slim/slim-skeleton [my-app-name]

And now I try to browse: “my.site/my_app_name/public”

As far as I know now I should see something like the Slim logo, instead I get an error:

Where “servizi” is my app name.
I tried to “find / app.log” but there is no such file.

Last time I followed this same procedure and worked, what am I missing?

Thanks.


#2

Seems like I was misreading the error and thought the “app.log” should have been under “src”, insted it’s on the app root:
/my_app/logs/app.log
I just created this file and everything worked.
Just to be sure I gave it 777 chmod, maybe I will get the courage to set it properly once I’ve tested something.

Hope this will help someone!


#3

Your web server should be pointing to /var/www/html/servizi/public instead of /var/www/html/ so you browse to http://example.com/ instead of http://example.com/servizi/public. Anything else can be really tricky.


#4

Well, it should, but I’m using apache and the root is …/html folder.
I don’t use "php -s … " command.

I’m planning to make subdomains and apache virtual hosts like servizi.example.com to point to correct servizi app folder.

Thanks


#5

Apache document root is by no means hard-coded. Yours only points to /var/www/html because you have DocumentRoot /var/www/html in your configuration file. :wink: