Created
March 3, 2021 08:40
-
-
Save serverok/e7e8e275a7ec3b69e19252edfed483e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat /usr/local/nginx/conf/rewrite/laravel.conf | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name takemyshot.com; | |
access_log off; | |
index index.html index.htm index.php; | |
root /data/wwwroot/takemyshot.com/project/public; | |
include /usr/local/nginx/conf/rewrite/laravel.conf; | |
#error_page 404 /404.html; | |
#error_page 502 /502.html; | |
location ~ .*\.(wma|wmv|asf|mp3|mmf|zip|rar|jpg|gif|png|swf|flv|mp4)$ { | |
valid_referers none blocked *.takemyshot.com takemyshot.com mytokri.com *.mytokri.com; | |
if ($invalid_referer) { | |
return 403; | |
} | |
} | |
location ~ [^/]\.php(/|$) { | |
#fastcgi_pass remote_php_ip:9000; | |
fastcgi_pass unix:/dev/shm/php-cgi.sock; | |
fastcgi_index index.php; | |
include fastcgi.conf; | |
} | |
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ { | |
expires 30d; | |
access_log off; | |
} | |
location ~ .*\.(js|css)?$ { | |
expires 7d; | |
access_log off; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment