Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Для фреймворков - стандартный
- server {
- server_name [название];
- root [путь];
- index index.html index.php;
- location /
- {
- try_files $uri $uri/ /index.php?$args;
- }
- location ~ \.php$
- {
- try_files $uri =404;
- fastcgi_index index.php;
- fastcgi_pass 127.0.0.1:9000;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- }
- }
- #Для автоматического поиска root директории
- server {
- server_name ~^(?:www\.)?(?P<host_wo_www>.+)$;
- root [путь]/$host_wo_www;
- index index.html index.php; #fix 403 error
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_index index.php;
- fastcgi_pass 127.0.0.1:9000; # Сокет либо порт для Unix систем
- #fastcgi_pass unix:/path
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- }
- }
Add Comment
Please, Sign In to add comment