N
N
nepster-web2014-01-28 17:37:01
Nginx
nepster-web, 2014-01-28 17:37:01

nginx folder path

So there is a folder with the deberc game in the deberc user directory:
/home/deberc/deberc
This folder has an interface folder that contains styles, scripts and graphics.
There is a return for example css styles:

location /~*\.css$ {
            root	/home/deberc/deberc/interface/style;
        }

If you make a request using the link: site.ru/style.css, everything is fine, it works.
Please tell me how to do the same, only for the address: site.ru/deberc That is
, if I go to site.ru/deberc/style.css, nginx should give the file /home/deberc/deberc/interface/style/style .css

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nepster-web, 2014-01-28
@nepster-web

how it worked like this:

location ~ ^/deberc/(.+\.(?:gif|jpg|jpeg|png|js|css))$ {
            alias /home/deberc/deberc/interface/$1;
        }

N
Nikolai Vasilchuk, 2014-01-28
@Anonym

Something like this:

location ~ \/deberc\/(.+)\.css$ {
            root	/home/deberc/deberc/interface/style;
        }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question