Skip to content

Commit cee0b1d

Browse files
authored
Merge pull request #27 from pythonindia/update-pe-domain
Update pythonexpress domain
2 parents 2be6d0f + 3582ef1 commit cee0b1d

File tree

11 files changed

+45
-45
lines changed

11 files changed

+45
-45
lines changed

Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Vagrant.configure(2) do |config|
2727

2828
config.vm.define "wye" do |machine|
2929
machine.vm.network "forwarded_port", guest: 80, host: 8082
30-
machine.vm.hostname = "pythonexpress.in"
30+
machine.vm.hostname = "pythonexpress.org"
3131
end
3232

3333
config.vm.provision "shell",

salt/roots/le/certbot-cli.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ rsa-key-size = 4096
1010

1111
# Uncomment and update to generate certificates for the specified
1212
# domains.
13-
domains = pythonexpress.in #, www.pythonexpress.in
13+
domains = pythonexpress.org #, www.pythonexpress.org
1414
# staging = true
1515

1616
# Uncomment to use a text interface instead of ncurses

salt/roots/nginx-default.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ server {
1111
# listen 443 ssl default_server;
1212
# listen [::]:443 ssl default_server;
1313
server_name _;
14-
return 301 $scheme://pythonexpress.in$request_uri;
14+
return 301 $scheme://pythonexpress.org$request_uri;
1515
# return 444 'Real Programmers: https://xkcd.com/378/';
1616
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
server {
2+
listen 80;
3+
4+
server_name beta.pythonexpress.org www.pythonexpress.org;
5+
location /.well-known/acme-challenge/ {
6+
root /var/www/html/pythonexpress.org/;
7+
}
8+
9+
location / {
10+
rewrite ^/(.*) https://pythonexpress.org/$1 permanent;
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{% set ssl = pillar['pythonexpress']['ssl'] %}
22

3-
/var/www/html/pythonexpress.in/:
3+
/var/www/html/pythonexpress.org/:
44
file.directory
55

6-
/etc/nginx/sites-available/pythonexpress.in.conf:
6+
/etc/nginx/sites-available/pythonexpress.org.conf:
77
file.managed:
8-
- source: salt://pythonexpressin/pythonexpress.in.conf
8+
- source: salt://pythonexpress/pythonexpress.org.conf
99
- template: jinja
1010
- require:
1111
- file: nginx_config_folders
@@ -14,16 +14,16 @@
1414

1515
/etc/nginx/sites-available/beta.pythonexpress.in.conf:
1616
file.managed:
17-
- source: salt://pythonexpressin/beta.pythonexpress.in.conf
17+
- source: salt://pythonexpress/beta.pythonexpress.in.conf
1818
- template: jinja
1919
- require:
2020
- file: nginx_config_folders
2121

22-
/etc/nginx/sites-enabled/pythonexpress.in.conf:
22+
/etc/nginx/sites-enabled/pythonexpress.org.conf:
2323
file.symlink:
24-
- target: /etc/nginx/sites-available/pythonexpress.in.conf
24+
- target: /etc/nginx/sites-available/pythonexpress.org.conf
2525
- require:
26-
- file: /etc/nginx/sites-available/pythonexpress.in.conf
26+
- file: /etc/nginx/sites-available/pythonexpress.org.conf
2727

2828
/etc/nginx/sites-enabled/beta.pythonexpress.in.conf:
2929
file.symlink:
@@ -34,22 +34,22 @@
3434
nginx_pythonexpress_dir:
3535
file.directory:
3636
- names:
37-
- /etc/nginx/sites-available/pythonexpress.in/
38-
- /etc/nginx/sites-available/pythonexpress.in/upstreams/
37+
- /etc/nginx/sites-available/pythonexpress.org/
38+
- /etc/nginx/sites-available/pythonexpress.org/upstreams/
3939
- require:
4040
- file: nginx_config_folders
4141

4242
{% if ssl['on'] %}
43-
/etc/ssl/pythonexpress.in.crt:
43+
/etc/ssl/pythonexpress.org.crt:
4444
file.managed:
4545
- contents_pillar: pythonexpress:ssl:cert
4646

47-
/etc/ssl/pythonexpress.in.key:
47+
/etc/ssl/pythonexpress.org.key:
4848
file.managed:
4949
- contents_pillar: pythonexpress:ssl:key
5050

51-
/etc/nginx/sites-available/pythonexpress.in.with_ssl.conf:
51+
/etc/nginx/sites-available/pythonexpress.org.with_ssl.conf:
5252
file.managed:
53-
- source: salt://pythonexpressin/pythonexpress.in.with_ssl.conf
53+
- source: salt://pythonexpress/pythonexpress.org.with_ssl.conf
5454

5555
{% endif %}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include /etc/nginx/sites-available/pythonexpress.in/upstreams/*.conf;
1+
include /etc/nginx/sites-available/pythonexpress.org/upstreams/*.conf;
22

33
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=old:60m;
44
server_tokens off;
@@ -7,39 +7,39 @@ server {
77
listen 80;
88

99
# deny illegal host headers
10-
if ($host !~* ^(pythonexpress.in|www.pythonexpress.in)$ ) {
10+
if ($host !~* ^(pythonexpress.org|www.pythonexpress.org)$ ) {
1111
return 444;
1212
}
1313

14-
server_name pythonexpress.in;
14+
server_name pythonexpress.org;
1515

1616
location /.well-known/acme-challenge/ {
17-
root /var/www/html/pythonexpress.in/;
17+
root /var/www/html/pythonexpress.org/;
1818
}
1919

2020
location = /robots.txt {
2121
return 200 "User-agent: * Disallow:";
2222
}
2323

2424
{% if not ssl['on'] %}
25-
include /etc/nginx/sites-available/pythonexpress.in/*.conf;
25+
include /etc/nginx/sites-available/pythonexpress.org/*.conf;
2626
{% else %}
2727
location / {
28-
rewrite ^/(.*) https://pythonexpress.in/$1 permanent;
28+
rewrite ^/(.*) https://pythonexpress.org/$1 permanent;
2929
}
3030
{% endif %}
3131
}
3232

3333
{% if ssl['on'] %}
3434
server {
35-
include /etc/nginx/sites-available/pythonexpress.in.with_ssl.conf;
35+
include /etc/nginx/sites-available/pythonexpress.org.with_ssl.conf;
3636

37-
server_name pythonexpress.in;
37+
server_name pythonexpress.org;
3838

3939
location = /robots.txt {
4040
return 200 "User-agent: * Disallow:";
4141
}
4242

43-
include /etc/nginx/sites-available/pythonexpress.in/*.conf;
43+
include /etc/nginx/sites-available/pythonexpress.org/*.conf;
4444
}
4545
{% endif %}

salt/roots/pythonexpressin/pythonexpress.in.with_ssl.conf renamed to salt/roots/pythonexpress/pythonexpress.org.with_ssl.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
listen 443 ssl;
22

33
# deny illegal host headers
4-
if ($host !~* ^(pythonexpress.in|www.pythonexpress.in)$ ) {
4+
if ($host !~* ^(pythonexpress.org|www.pythonexpress.org)$ ) {
55
return 444;
66
}
77

@@ -10,8 +10,8 @@ if ($scheme = http) {
1010
rewrite ^(.*) https://$server_name$1 permanent;
1111
}
1212

13-
ssl_certificate /etc/ssl/pythonexpress.in.crt;
14-
ssl_certificate_key /etc/ssl/pythonexpress.in.key;
13+
ssl_certificate /etc/letsencrypt/live/pythonexpress.org/fullchain.pem;
14+
ssl_certificate_key /etc/letsencrypt/live/pythonexpress.org/privkey.pem;
1515

1616
# Recomended settings form
1717
# https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html

salt/roots/pythonexpressin/beta.pythonexpress.in.conf

Lines changed: 0 additions & 12 deletions
This file was deleted.

salt/roots/top.sls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ base:
1010
- inpycon
1111
- lib/uwsgi_common
1212
- junction
13-
'nodename:pythonexpress.in':
13+
'nodename:pythonexpress.org':
1414
- match: grain
1515
- lib/uwsgi_common
16-
- pythonexpressin
16+
- pythonexpress
1717
- wye
1818
- mail
1919
- lib/celery

salt/roots/wye/files/prod.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ADMINS = ({%for name, email in admins.items() %}
1313
('{{name}}', '{{email}}'), {% endfor %}
1414
)
1515

16-
ALLOWED_HOSTS = ['.pythonexpress.in']
16+
ALLOWED_HOSTS = ['.pythonexpress.org']
1717

1818
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
1919
EMAIL_HOST_USER = '{{ pillar["wye"]["email_host_user"] }}'

0 commit comments

Comments
 (0)