diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..bcb84b5 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,26 @@ +version: '3' +services: + khao-sat-sunday-nginx: + container_name: khao-sat-sunday-nginx + image: nginx:alpine + ports: + - "31010:80" + - "31043:443" + restart: unless-stopped + volumes: + - ./:/usr/share/nginx/html + - ./nginx/:/etc/nginx/conf.d/ + - ./certbot/conf/:/etc/nginx/ssl/:ro + - ./certbot/www:/var/www/certbot/:ro + networks: + - app-network + certbot: + image: certbot/certbot:latest + volumes: + - ./certbot/www/:/var/www/certbot/:rw + - ./certbot/conf/:/etc/letsencrypt/:rw +networks: + app-network: + name: gk.internal + # driver: bridge + external: true diff --git a/index.html b/index.html new file mode 100644 index 0000000..1d3d841 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + Khảo sát + + + + + \ No newline at end of file diff --git a/nginx/vhost.conf b/nginx/vhost.conf new file mode 100644 index 0000000..2ea30bd --- /dev/null +++ b/nginx/vhost.conf @@ -0,0 +1,53 @@ +server { + listen 80; + server_name khaosat.sundayenglish.com; + index index.php index.html; + error_log /var/log/nginx/error.log; + access_log /var/log/nginx/access.log; + root /usr/share/nginx/html; + server_tokens off; + + uwsgi_read_timeout 600s; + proxy_connect_timeout 1800; + send_timeout 1800; + + location /.well-known/acme-challenge/ { + #allow all; + root /var/www/certbot; + } + + location / { + try_files $uri $uri/ /index.php$is_args$args; + gzip_static on; + } + + client_max_body_size 1024m; +} +# server { +# listen 443 default_server ssl http2; +# listen [::]:443 ssl http2; + +# server_name khaosat.sundayenglish.com; + +# ssl_certificate /etc/nginx/ssl/live/khaosat.sundayenglish.com/fullchain.pem; +# ssl_certificate_key /etc/nginx/ssl/live/khaosat.sundayenglish.com/privkey.pem; + + +# index index.php index.html; +# error_log /var/log/nginx/error.log; +# access_log /var/log/nginx/access.log; +# root /usr/share/nginx/html; + +# uwsgi_read_timeout 600s; +# # proxy_read_timeout 1800; +# proxy_connect_timeout 1800; +# #proxy_send_timeout 1800; +# send_timeout 1800; + +# location / { +# try_files $uri $uri/ /index.php$is_args$args; +# gzip_static on; +# } + +# client_max_body_size 1024m; +# } \ No newline at end of file