README.nginx.exec-shell-script: some minor adjustments.
This commit is contained in:
		| @@ -6,7 +6,7 @@ | |||||||
| # see:  | # see:  | ||||||
| #    https://stackoverflow.com/questions/22891148/nginx-how-to-run-a-shell-script-on-every-request | #    https://stackoverflow.com/questions/22891148/nginx-how-to-run-a-shell-script-on-every-request | ||||||
|  |  | ||||||
| WEBSITE_NAME="o30.oopen.de" | WEBSITE_NAME="rec.video.faire-mobilitaet.de" | ||||||
| DOCUMENT_ROOT="/var/www/$WEBSITE_NAME" | DOCUMENT_ROOT="/var/www/$WEBSITE_NAME" | ||||||
|  |  | ||||||
| # Install 'fcgiwrap' | # Install 'fcgiwrap' | ||||||
| @@ -41,6 +41,8 @@ echo ' <br /> <br /> | |||||||
| echo "</pre></body></html>" | echo "</pre></body></html>" | ||||||
| EOF | EOF | ||||||
|  |  | ||||||
|  | chmod 755 ${DOCUMENT_ROOT}/enable-recording.sh | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Ceate script disable-recording.sh | # Ceate script disable-recording.sh | ||||||
| @@ -65,11 +67,12 @@ echo ' <br /> <br /> | |||||||
| echo "</pre></body></html>" | echo "</pre></body></html>" | ||||||
| EOF | EOF | ||||||
|  |  | ||||||
|  | chmod 755 ${DOCUMENT_ROOT}/disable-recording.sh | ||||||
|  |  | ||||||
|  |  | ||||||
| # Create NGINX configuration for site | # Create NGINX configuration for site | ||||||
| # | # | ||||||
| cat <<EOF >> "/etc/nginx/sites-available/${WEBSITE_NAME}.conf" | cat <<EOF > "/etc/nginx/sites-available/${WEBSITE_NAME}.conf" | ||||||
| cat <<EOF >> "/root/${WEBSITE_NAME}.conf" |  | ||||||
| # - ${WEBSITE_NAME} | # - ${WEBSITE_NAME} | ||||||
|  |  | ||||||
| server { | server { | ||||||
| @@ -85,6 +88,11 @@ server { | |||||||
|     listen [::]:443 ssl http2; |     listen [::]:443 ssl http2; | ||||||
|     server_name ${WEBSITE_NAME}; |     server_name ${WEBSITE_NAME}; | ||||||
|  |  | ||||||
|  |     root /var/www/${WEBSITE_NAME}; | ||||||
|  |  | ||||||
|  |     auth_basic "Video Admin Area"; | ||||||
|  |     auth_basic_user_file conf.d/.htpasswd-rec-video; | ||||||
|  |  | ||||||
|     # Include location directive for Let's Encrypt ACME Challenge |     # Include location directive for Let's Encrypt ACME Challenge | ||||||
|     # |     # | ||||||
|     # Needed for (automated) updating certificate |     # Needed for (automated) updating certificate | ||||||
| @@ -124,8 +132,6 @@ server { | |||||||
|     ssl_certificate_key /var/lib/dehydrated/certs/${WEBSITE_NAME}/privkey.pem; |     ssl_certificate_key /var/lib/dehydrated/certs/${WEBSITE_NAME}/privkey.pem; | ||||||
|     ssl_trusted_certificate /var/lib/dehydrated/certs/${WEBSITE_NAME}/chain.pem; |     ssl_trusted_certificate /var/lib/dehydrated/certs/${WEBSITE_NAME}/chain.pem; | ||||||
|  |  | ||||||
|     root /var/www/o30.oopen.de; |  | ||||||
|  |  | ||||||
|     # ssi on with javascript for multidomain variables in config.js |     # ssi on with javascript for multidomain variables in config.js | ||||||
|     ssi on; |     ssi on; | ||||||
|     ssi_types application/x-javascript application/javascript; |     ssi_types application/x-javascript application/javascript; | ||||||
| @@ -147,3 +153,5 @@ server { | |||||||
|    } |    } | ||||||
| } | } | ||||||
| EOF | EOF | ||||||
|  |  | ||||||
|  | ln -s ../sites-available/${WEBSITE_NAME}.conf /etc/nginx/sites-enabled/${WEBSITE_NAME} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user