1

Hi I am trying to install the second php website on my digital ocean using nginx server.

HTML files show up fine. When I try to host PHP files instead of executing they are downloading. Here is content of geechoomis.a2zecart.com.conf

server {
listen       80;
server_name  geechoomis.a2zecart.com;
root   /var/www/geechoomis.a2zecart.com;
index  index.html index.htm index.php;
location ~ \.php$ {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
   }
}

Another wordpress site is also running on the same server which is working fine. But under folder /home/dev/public_html; here is the content of dev.conf

server {
        server_name  _;
        rewrite ^ $scheme://dev.geechoo.in$request_uri redirect;
}
server {
    listen       80;
    server_name  dev.geechoo.in;
    root   /home/dev/public_html;
    index  index.html index.htm index.php;
    charset utf-8;
    location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
    expires 30d;
    add_header Pragma public;
    add_header Cache-Control "public";
    try_files $uri =404;
}
    include global/restrictions.conf;
    include global/wordpress.conf;
    include global/cache.conf;
}

Even when I use the same cong above it is still not working.

0 Answers0