Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- listen [::]:80;
- server_name ekb-news.ru;
- root /var/www/ekb-news.ru/www;
- index index.php index.html index.htm;
- access_log /var/www/ekb-news.ru/logs/access.log;
- error_log /var/www/ekb-news.ru/logs/error.log;
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- location ~ \.php$ {
- include snippets/fastcgi-php.conf;
- # With php5-cgi alone:
- # fastcgi_pass 127.0.0.1:9000;
- # With php5-fpm:
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- }
- # Запрещаем доступ к файлам, имя которых начинается с точки
- location ~ /\. {
- deny all;
- }
- # Запрещаем доступ к файлам, путь к которым соответствует следующим критериям:
- location ~ /protected/ {
- return 444;
- }
- # Файлы тем (вьюшки), так же не доступны для чтения:
- location ~ ^/themes/(.*)/views/ {
- return 444;
- }
- # deny access to .htaccess files, if Apache's document root
- # concurs with nginx's one
- #
- location ~ /\.ht {
- deny all;
- }
- }
- server {
- listen 80;
- listen [::]:80;
- server_name www.ekb-news.ru;
- return 301 $scheme://ekb-news.ru$request_uri;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement