Last active
July 9, 2016 02:52
-
-
Save simkimsia/7655342 to your computer and use it in GitHub Desktop.
restler api nginx config
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; | |
client_max_body_size 2M; | |
server_name ng-book.oppoin.com; | |
root /var/virtual/ng-book.oppoin.com/current/examples/http-api-server; | |
location / { | |
index index.html index.htm; | |
} | |
location /api { | |
index index.php; | |
if ( !-e $request_filename) { | |
rewrite ^.* /api/index.php last; | |
} | |
} | |
# Pass PHP scripts to PHP-FPM | |
location ~* \.php$ { | |
fastcgi_pass 127.0.0.1:9000; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try the following