Last active
November 9, 2023 04:23
-
-
Save samsulmaarif/f65650babf9811dae24b537e30814355 to your computer and use it in GitHub Desktop.
Serving /apple-app-site-association for iOS App in nginx
This file contains hidden or 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 myweb.id www.myweb.id; | |
root /var/www/myweb.id/project/public/; | |
error_log /var/log/nginx/myweb.id-error.log; | |
index index.php index.html; | |
location /apple-app-site-association { | |
alias /var/www/otherfolder/ios/; | |
index apple-app-site-association.json | |
autoindex on; | |
} | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
#error_page 404 /404.html; | |
# location = /40x.html { | |
#} | |
#error_page 500 502 503 504 /50x.html; | |
# location = /50x.html { | |
#} | |
location ~ \.php$ { | |
#proxy_read_timeout 300; | |
#proxy_connect_timeout 300; | |
fastcgi_pass 127.0.0.1:9001; | |
#proxy_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
#location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | |
# allow all; | |
# expires max; | |
# try_files $uri $uri/ /$args; | |
#} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment