V
V
vs-vs2021-02-28 18:39:11
Nginx
vs-vs, 2021-02-28 18:39:11

How to specify the path to the public folder in nginx?

Hello.
Laravel is installed in 2 folders
/var/www/domain.com/laravel
/var/www/domain.com/htdocs (css ,js is taken from this folder)

Proger asks to change the paths so that everything starts from the /var/www/site folder. com/laravel/public.
Says this needs to be done at the nginx level, no one has encountered such a problem, how to solve it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
no_one_safe, 2021-02-28
@vs-vs

nginx

K
ky0, 2021-02-28
@ky0

Change the site directory structure so that it spans both of your two directories. If you really really want to have several directories on the same level, /htdocsyou can implement the return of statics from a separate domain. All other methods are of varying degrees of crookedness, aliases, rewrites, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question