1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yourls_ynh.git synced 2024-09-03 20:35:59 +02:00

nginx conf

This commit is contained in:
Thomas LEBEAU 2014-06-13 10:41:02 +02:00
parent aa94ebdc8b
commit d0302acf25
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,8 @@
location PATHTOCHANGE { location PATHTOCHANGE {
alias ALIASTOCHANGE; alias ALIASTOCHANGE;
rewrite ^/$ http://$server_name/admin permanent; if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
index index.php; index index.php;
try_files $uri $uri/ /index.php?$args; try_files $uri $uri/ /index.php?$args;

View file

@ -48,7 +48,7 @@ sudo chown -R www-data: $final_path
# Modify Nginx configuration file and copy it to Nginx conf directory # Modify Nginx configuration file and copy it to Nginx conf directory
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf* sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf*
sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf* sed -i "s@ALIASTOCHANGE@$final_path/admin@g" ../conf/nginx.conf*
nginxconf=/etc/nginx/conf.d/$domain.d/yourls.conf nginxconf=/etc/nginx/conf.d/$domain.d/yourls.conf
sudo cp ../conf/nginx.conf $nginxconf sudo cp ../conf/nginx.conf $nginxconf
sudo chown root: $nginxconf sudo chown root: $nginxconf