cardinalhorizon / VAOS

Virtual Aviation Operations System
http://www.fsvaos.net
GNU General Public License v3.0
47 stars 20 forks source link

NGINX Configuration #36

Closed mcalsada closed 7 years ago

mcalsada commented 7 years ago

Installation documentation does not provide the NGINX configuration options. NGINX does not make use of the .htaccess or web.config included in the repo and needs to be handled manually when setting up the nginx vhost.

The following is a simple configuration to get base functionality working copied from laravel documentation. Addition configuration is necessary for the ACARS and authorization setup.

try_files $uri $uri/ @rewrite;
location @rewrite {
    rewrite ^/(.*)$ /index.php?_url=/$1;
}
BossOfGames commented 7 years ago

Let me get you a working config file I am using for multiple installs via nginx

mattwb65 commented 6 years ago

Is the above mentioned nginx configuration available publicly somewhere?

BossOfGames commented 6 years ago

From https://laravel.com/docs/5.5/deployment#nginx

server { listen 80; server_name example.com; root /example.com/public;

add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";

index index.html index.htm index.php;

charset utf-8;

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt  { access_log off; log_not_found off; }

error_page 404 /index.php;

location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
}

location ~ /\.(?!well-known).* {
    deny all;
}

}