Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niladam/35bbb47c8e4dc066c73a8e8b837bf1c7 to your computer and use it in GitHub Desktop.
Save niladam/35bbb47c8e4dc066c73a8e8b837bf1c7 to your computer and use it in GitHub Desktop.
MailWizz Nginx Configuration (Install using Simple LNMP Installer - https://github.com/joglomedia/deploy) - MailWizz EMA is a simple, efficient and full-featured email marketing application with an impressive features set. Download MailWizz here http://goo.gl/qDMd0I
server {
listen 80;
#listen [::]:80 default_server ipv6only=on;
## Make site accessible from world web.
server_name mailwizz.dev www.mailwizz.dev;
## Log Settings.
access_log /var/log/nginx/mailwizz.dev_access.log;
error_log /var/log/nginx/mailwizz.dev_error.log error;
#charset utf-8;
## Vhost root directory
set $root_path '/home/masedi/Webs/mailwizz.dev';
set $yii_bootstrap 'index.php';
root $root_path;
index index.php index.html index.htm;
## Global directives configuration.
include /etc/nginx/conf.vhost/block.conf;
include /etc/nginx/conf.vhost/staticfiles.conf;
include /etc/nginx/conf.vhost/restrictions.conf;
## Default vhost directives configuration, use only one config.
include /etc/nginx/conf.vhost/site_default.conf;
## MailWizz custom clean URL ##
if (!-e $request_filename){
rewrite customer/.* /customer/index.php;
}
if (!-e $request_filename){
rewrite backend/.* /backend/index.php;
}
if (!-e $request_filename){
rewrite api/.* /api/index.php;
}
if (!-e $request_filename){
rewrite ^(.*)$ /index.php;
}
## pass the PHP scripts to php5-fpm
location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# Include FastCGI Params.
include /etc/nginx/fastcgi_params;
# Overwrite FastCGI Params here.
#fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_param SCRIPT_NAME $fastcgi_script_name;
# Include FastCGI Configs.
include /etc/nginx/conf.vhost/fastcgi.conf;
# Uncomment to Enable PHP FastCGI cache.
#include /etc/nginx/conf.vhost/fastcgi_cache.conf;
# FastCGI socket, change to fits your own socket!
fastcgi_pass unix:/var/run/php5-fpm.masedi.sock;
}
## Uncomment to enable error page directives configuration.
#include /etc/nginx/conf.vhost/errorpage.conf;
## Add your custom site directives here.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment