Running regular html site along side wordpress mu on lemp

December 13, 2015 350 views
PHP Nginx WordPress Configuration Management LEMP DNS Ubuntu

Hi everyone,

I'm having issues putting getting two host name blocks working together. I have a lemp server which has a Wordpress MU setup. I would also like to run a seperate website/domain for a regular html site.

So I have which is WP MU which is a regular html site.

I followed this tutorial to setup my wordpress mu

I have WP MU setup my working perfectly.

My configuration looks like this:

server {
    listen [::]:80 ipv6only=off;
    server_name *;

    root /usr/share/nginx/wordpress;
    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ /index.php?$args ;

    location ~ /favicon.ico {
        access_log off;
        log_not_found off;

    location ~ \.php$ {
        try_files $uri /index.php;
        include fastcgi_params;

    access_log  /var/log/nginx/$host-access.log;
    error_log   /var/log/nginx/wpms-error.log;

My config looks like this

server {
    listen 80;
    listen [::]:80;

    root /var/www/;
    index index.html index.htm;


    location / {
        try_files $uri $uri/ =404;

When I try to restart ngnix it fails. What is also strange is that when I go to my server ip or it automatically redirects to my page

Could someone shed some light on what I'm doing wrong?

1 Answer

What does the Nginx error log say? This always hands over important and usefull information you can use to debug your vhosts.

Have another answer? Share your knowledge.