I am trying to configure multiple webapps on my nginx web server, but I cannot get one Laravel application to work, which requires $ document_root to be installed in the laravel shared folder. I am currently trying to configure it using the alias directive, but for an unclear reason this does not work. Here is what I am trying to do.
To check the configuration of "alias", I put the test.php files in /var/www/html/paperwork/frontend/public/test.php and tried to access it through https: //IP/paperwork/test.php . I get a 404 error and nothing in the nginx error log. If I try https: //IP/paperwork/frontend/public/test.php in the browser, it will display the test.php file without errors. Nothing will change if I uncomment the try_files line in the php location.
If I copy test.php to / var / www / html / paperwork / test 2.php and access https: //IP/paperwork/test2.php , the file is displayed without errors, so I can see here that the alias is not works because test2.php does not exist in the public documentation directory.
I may have a different behavior if I uncomment the php location in the documentation location. At the same time, requests like https: //IP/paperwork/test.php do not display 404, but a blank screen.
I went through a lot of forums / questions related to this, but I could not get the working configuration for a simple task, for example, display test.php ...
Thanks!
source share