Setting up on Nginx with PHP FPM on Linux - OfficeStack/OpenSkedge GitHub Wiki
Nginx is the preferred server on which OpenSkedge is developed and will always be supported. It requires a bit more steps to setup than OpenSkedge on a traditional LAMP stack, but it has many benefits.
Using your distribution's package manager, install find and install the packages for nginx, php-fpm, php-cgi, mysql (or another database if you choose), php-mysql, the PDO mysql driver (if it's a separate package from the PHP MySQL package), php-pear. These will have a variety of different names in different distributions. Here's what it will look like in Debian or Ubuntu-based distributions:
$ sudo apt-get install nginx php5-fpm php5-cgi mysql-server php5-mysql php-pear
- Create a new virtual host in /etc/nginx/sites-enabled (or wherever your installation of Nginx reads configuration files from)
- Use something similar to the following, replacing the placeholders in [] with your configuration
server {
root [/path/to/openskedge]/web;
index app.php;
server_name [hostnames for your installation eg. example.com www.example.com];
location / {
try_files $uri $uri/ /app.php?$query_string;
}
location ~ ^/(app_dev|app)\.php$ {
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
- Reload nginx (e.g.
sudo service nginx reload)