Skip to content

Commit b69f3f9

Browse files
committed
cronrab's '.well-known' folder location insert command added in nginx script files.
1 parent 3512272 commit b69f3f9

27 files changed

Lines changed: 128 additions & 42 deletions

config/web-server/nginx/gunicorn/conf.d/django_sample_gunicorn_ng.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ server {
3232
# Allow Lets Encrypt Domain Validation Program
3333
location ^~ /.well-known/acme-challenge/ {
3434
allow all;
35+
root /www/django_sample;
3536
}
3637

3738
# Block dot file (.htaccess .htpasswd .svn .git .env and so on.)

config/web-server/nginx/gunicorn/nginx_conf.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
while :
44
do
55
echo "* if your webroot has sub-level, you should be insert as \\\/A\\\/B\\\/C"
6-
echo -n "Enter the service web root >"
6+
echo "ex) shop\\\/django_sample"
7+
echo -n "Enter the service web root without the path of '/www/' >"
78
read webroot
89
echo "Entered service web root: $webroot"
910
if [[ "$webroot" != "" ]]; then

config/web-server/nginx/gunicorn/nginx_https_conf.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
while :
44
do
55
echo "* if your webroot has sub-level, you should be insert as \\\/A\\\/B\\\/C"
6-
echo -n "Enter the service web root >"
6+
echo "ex) shop\\\/django_sample"
7+
echo -n "Enter the service web root without the path of '/www/' >"
78
read webroot
89
echo "Entered service web root: $webroot"
910
if [[ "$webroot" != "" ]]; then

config/web-server/nginx/gunicorn/nginx_proxy_conf.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
#!/bin/bash
22

3+
while :
4+
do
5+
echo "* if your the location of crontab's '.well-known' folder has sub-level, you should be insert as \\\/A\\\/B\\\/C"
6+
echo -n "Enter the crontab folder location >"
7+
read crontab_folder
8+
echo "Entered the crontab folder location: $crontab_folder"
9+
if [[ "$crontab_folder" != "" ]]; then
10+
break
11+
fi
12+
done
13+
314
while :
415
do
516
echo -n "Enter the service portnumber >"
@@ -53,6 +64,7 @@ if [[ "$proxyport" == "" ]]; then
5364
else
5465
sed 's/proxyport/'$proxyport'/g' $filename'3'.temp > $filename'4'.temp
5566
fi
56-
sed 's/filename/'$filename'/g' $filename'4'.temp > ./conf.d/$filename'_proxy_ng'.conf
67+
sed 's/crontab_folder/'$crontab_folder'/g' $filename'4'.temp > $filename'5'.temp
68+
sed 's/filename/'$filename'/g' $filename'5'.temp > ./conf.d/$filename'_proxy_ng'.conf
5769

5870
rm *.temp

config/web-server/nginx/gunicorn/nginx_proxy_https_conf.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ if [[ "$proxyport" == "" ]]; then
5353
else
5454
sed 's/proxyport/'$proxyport'/g' $filename'3'.temp > $filename'4'.temp
5555
fi
56-
sed 's/filename/'$filename'/g' $filename'4'.temp > ./conf.d/$filename'_proxy_https_ng'.conf
56+
sed 's/crontab_folder/'$crontab_folder'/g' $filename'4'.temp > $filename'5'.temp
57+
sed 's/filename/'$filename'/g' $filename'5'.temp > ./conf.d/$filename'_proxy_https_ng'.conf
5758

5859
rm *.temp

config/web-server/nginx/gunicorn/sample_nginx.conf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ server {
99
location /media {
1010
gzip_static on;
1111
expires max;
12-
#alias /www/py37/django_test/repo/media;
13-
alias webroot/media; # your Django project's media files - amend as required
12+
#alias /www/django_sample/media;
13+
alias /www/webroot/media; # your Django project's media files - amend as required
1414
#include /etc/nginx/mime.types;
1515
}
1616

1717
location /static {
1818
gzip_static on;
1919
expires max;
20-
#alias /www/py37/django_test/repo/.static_root;
20+
#alias /www/django_sample/static;
2121
# normally static folder is named as /static
22-
alias webroot/static; # your Django project's static files - amend as required
22+
alias /www/webroot/static; # your Django project's static files - amend as required
2323
#include /etc/nginx/mime.types;
2424
}
2525

@@ -32,6 +32,7 @@ server {
3232
# Allow Lets Encrypt Domain Validation Program
3333
location ^~ /.well-known/acme-challenge/ {
3434
allow all;
35+
root /www/webroot;
3536
}
3637

3738
# Block dot file (.htaccess .htpasswd .svn .git .env and so on.)

config/web-server/nginx/gunicorn/sample_nginx_https.conf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ server {
3636
location /media {
3737
gzip_static on;
3838
expires max;
39-
#alias /www/py37/django_test/repo/media;
40-
alias webroot/media; # your Django project's media files - amend as required
39+
#alias /www/django_sample/media;
40+
alias /www/webroot/media; # your Django project's media files - amend as required
4141
#include /etc/nginx/mime.types;
4242
}
4343

4444
location /static {
4545
gzip_static on;
4646
expires max;
47-
#alias /www/py37/django_test/repo/.static_root;
47+
#alias /www/django_sample/static;
4848
# normally static folder is named as /static
49-
alias webroot/static; # your Django project's static files - amend as required
49+
alias /www/webroot/static; # your Django project's static files - amend as required
5050
#include /etc/nginx/mime.types;
5151
}
5252

@@ -58,6 +58,7 @@ server {
5858
# Allow Lets Encrypt Domain Validation Program
5959
location ^~ /.well-known/acme-challenge/ {
6060
allow all;
61+
root /www/webroot;
6162
}
6263

6364
# Block dot file (.htaccess .htpasswd .svn .git .env and so on.)

config/web-server/nginx/gunicorn/sample_nginx_proxy.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ server {
88
server_name domain www.domain;
99

1010
access_log /log/nginx/filename.gunicorn_proxy_access.log main;
11-
error_log /log/nginx/filename.gunicorn_proxy_error.log warn;
11+
error_log /log/nginx/filename.gunicorn_proxy_error.log warn;
1212
# Log Location. Can be anywhere. Make sure the nginx user defined in /etc/nginx/nginx.conf has r/w permissions
1313

1414
###
@@ -20,6 +20,12 @@ server {
2020
# mind), you can define a unix:.sock location here as well
2121
###
2222

23+
# Allow Lets Encrypt Domain Validation Program
24+
location ^~ /.well-known/acme-challenge/ {
25+
allow all;
26+
root crontab_folder;
27+
}
28+
2329
# Block dot file (.htaccess .htpasswd .svn .git .env and so on.)
2430
location ~ /\. {
2531
deny all;

config/web-server/nginx/gunicorn/sample_nginx_proxy_https.conf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ server {
3535
access_log /log/nginx/filename.gunicorn_proxy_access.log main;
3636
error_log /log/nginx/filename.gunicorn_proxy_error.log warn;
3737

38-
# # Allow Lets Encrypt Domain Validation Program
39-
# location ^~ /.well-known/acme-challenge/ {
40-
# allow all;
41-
# }
38+
# Allow Lets Encrypt Domain Validation Program
39+
location ^~ /.well-known/acme-challenge/ {
40+
allow all;
41+
root crontab_folder;
42+
}
4243

4344
# Block dot file (.htaccess .htpasswd .svn .git .env and so on.)
4445
location ~ /\. {

config/web-server/nginx/php/conf.d/sample_php_ng.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ server {
3030
# Allow Lets Encrypt Domain Validation Program
3131
location ^~ /.well-known/acme-challenge/ {
3232
allow all;
33+
/www/php_sample;
3334
}
3435

3536
# Block dot file (.htaccess .htpasswd .svn .git .env and so on.)

0 commit comments

Comments
 (0)