diff --git a/files/egg.conf b/files/egg.conf new file mode 100644 index 0000000000000000000000000000000000000000..0533297f5fa5c930f79244443775bcf10ca38505 --- /dev/null +++ b/files/egg.conf @@ -0,0 +1,54 @@ +server { + server_name teman.it.liu.se; + root /var/www/teman; + + # Load configuration files for the default server block. + #include /etc/nginx/default.d/*.conf; + + location / { + #expires -1; + } + + error_page 404 /404.html; + location = /40x.html { + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + } +} + +server { + listen 80; + server_name egg.it.liu.se; + + client_max_body_size 0; + + location = /favicon.ico { + log_not_found off; + access_log off; + } + location /system/ { + + auth_request /auth-verify; + + root /var/www/nta-digital-portal/private/uploads; + #root /var/www/ntadigital_temp/public; + } + location /auth-verify { + + internal; + proxy_pass http://localhost:3000/api/auth/verify; + proxy_pass_request_body off; + proxy_set_header Content-Length ""; + proxy_set_header X-Original-URI $request_uri; + } + location / { + proxy_pass http://localhost:3000; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } +} \ No newline at end of file diff --git a/manifests/nginx.pp b/manifests/nginx.pp index a2b4568fe57880c444067aef757898328764746a..9b9e7b1cf6ec0ae3e3550fbf38c497a3966763d3 100644 --- a/manifests/nginx.pp +++ b/manifests/nginx.pp @@ -11,9 +11,9 @@ class egg::nginx () { # source => "puppet:///modules/${module_name}/nginx.conf", # notify => Service['nginx'], # } - file { '/etc/nginx/conf.d/eggsample.conf': + file { '/etc/nginx/conf.d/egg.conf': ensure => 'present', - source => "puppet:///modules/${module_name}/eggsample.conf", + source => "puppet:///modules/${module_name}/egg.conf", notify => Service['nginx'], require => Package['nginx'], } @@ -28,4 +28,9 @@ class egg::nginx () { zone => 'liu', service => 'http', } + firewalld_service { 'Allow http in the public Zone': + ensure => present, + zone => 'public', + service => 'http', + } }