fixes or whatevs

merge-requests/2/head
Matthew 2021-12-11 19:01:58 -05:00
parent 611f958ead
commit d36c34b8ee
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
2 changed files with 43 additions and 59 deletions

View File

@ -4,64 +4,18 @@ server {
server_name edu.libraryofcode.org; server_name edu.libraryofcode.org;
ssl_certificate /etc/nginx/ssl/org.chain.crt; ssl_certificate /etc/nginx/ssl/org.chain.crt;
ssl_certificate_key /etc/nginx/ssl/org.key.pem; ssl_certificate_key /etc/nginx/ssl/org.key.pem;
location / { root /opt/moodle;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; index index.html index.htm index.php;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; location ~ [^/]\.php(/|$) {
proxy_set_header X-Frame-Options SAMEORIGIN; fastcgi_split_path_info ^(.+\.php)(/.+)$;
proxy_pass http://localhost:7560; fastcgi_index index.php;
proxy_read_timeout 90; fastcgi_pass /run/php/php8.0-fpm_moodle.sock;
} include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
} }
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name studio.libraryofcode.org;
ssl_certificate /etc/nginx/ssl/org.chain.crt;
ssl_certificate_key /etc/nginx/ssl/org.key.pem;
client_max_body_size 100M;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_pass http://localhost:7560;
proxy_read_timeout 90;
}
}
#server {
# listen 443 ssl http2;
# listen [::]:443 ssl http2;
# server_name edu.libraryofcode.org;
# ssl_certificate /etc/nginx/ssl/org.chain.crt;
# ssl_certificate_key /etc/nginx/ssl/org.key.pem;
# root /opt/canvas/public;
# charset utf-8;
# include mime.types;
# client_max_body_size 5000M;
# default_type application/octet-stream;
# access_log /var/log/nginx/canvas.access.log;
# error_log /var/log/nginx/canvas.error.log;
# passenger_ruby /usr/local/bin/ruby2.4;
# passenger_load_shell_envvars off;
# passenger_min_instances 8;
#passenger_log_level 4;
# passenger_start_timeout 300;
# passenger_enabled on;
#passenger_pre_start https://edu.libraryofcode.org/;
# rails_env production;
#}

View File

@ -0,0 +1,30 @@
// php7.2-fpm-internships.sock
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name internships.libraryofcode.org;
ssl_certificate /etc/nginx/ssl/org.chain.crt;
ssl_certificate_key /etc/nginx/ssl/org.key.pem;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_pass /run/php/php7.2-fpm-internships.sock;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# Hide all dot files but allow "Well-Known URIs" as per RFC 5785
location ~ /\.(?!well-known).* {
return 404;
}
location ~ (/vendor/|/node_modules/|composer\.json|/readme|/README|readme\.txt|/upgrade\.txt|db/install\.xml|/fixtures/|/behat/|phpunit\.xml|\.lock|environment\.xml) {
deny all;
return 404;
}
}