Skip to content

Instantly share code, notes, and snippets.

@Maksclub
Created July 13, 2017 08:11
Show Gist options
  • Save Maksclub/e3769dead2f24d3cd9f7c03e92c5945a to your computer and use it in GitHub Desktop.
Save Maksclub/e3769dead2f24d3cd9f7c03e92c5945a to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name makssite.loc;
root /home/m/PhpstormProjects/makssite/frontend/web;
index index.php;
access_log /home/m/PhpstormProjects/makssite/log/frontend-access.log;
error_log /home/m/PhpstormProjects/makssite/log/frontend-error.log;
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
try_files $uri =404;
}
location ~ /\.ht {
deny all;
}
}
server {
listen 80;
server_name makspassadmin.loc admin.makssite.loc;
root /home/m/PhpstormProjects/makssite/backend/web;
index index.php;
access_log /home/m/PhpstormProjects/makssite/log/backend-access.log;
error_log /home/m/PhpstormProjects/makssite/log/backend-error.log;
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
try_files $uri =404;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment