mirror of
https://github.com/YunoHost-Apps/writefreely_ynh.git
synced 2024-09-03 20:36:02 +02:00
Added nginx configuration
This commit is contained in:
parent
2d780d9ec5
commit
b5df8c923c
1 changed files with 19 additions and 29 deletions
|
@ -1,33 +1,23 @@
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) {
|
||||||
location __PATH__/ {
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
|
proxy_redirect off;
|
||||||
|
}
|
||||||
|
|
||||||
# Path to source
|
location ~ ^/(css|img|js|fonts)/ {
|
||||||
alias __FINALPATH__/ ;
|
root __FINALPATH__/static;
|
||||||
|
# Optionally cache these files in the browser:
|
||||||
|
# expires 12M;
|
||||||
|
}
|
||||||
|
|
||||||
# Force usage of https
|
location / {
|
||||||
if ($scheme = http) {
|
proxy_set_header Host $host;
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
}
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
|
proxy_redirect off;
|
||||||
|
}
|
||||||
|
|
||||||
### Example PHP configuration (remove it if not used)
|
|
||||||
index index.php;
|
|
||||||
|
|
||||||
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
|
|
||||||
#client_max_body_size 50M;
|
|
||||||
|
|
||||||
try_files $uri $uri/ index.php;
|
|
||||||
location ~ [^/]\.php(/|$) {
|
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
||||||
fastcgi_pass unix:/var/run/php5-fpm-__NAME__.sock;
|
|
||||||
|
|
||||||
fastcgi_index index.php;
|
|
||||||
include fastcgi_params;
|
|
||||||
fastcgi_param REMOTE_USER $remote_user;
|
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
||||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
|
||||||
}
|
|
||||||
### End of PHP configuration part
|
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue