Skip to content

Instantly share code, notes, and snippets.

@samsulmaarif
Last active November 9, 2023 04:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save samsulmaarif/f65650babf9811dae24b537e30814355 to your computer and use it in GitHub Desktop.
Save samsulmaarif/f65650babf9811dae24b537e30814355 to your computer and use it in GitHub Desktop.
Serving /apple-app-site-association for iOS App in nginx
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