shevabam / ezservermonitor-web

eZ Server Monitor`Web - A simple and lightweight dashboard for Linux
GNU General Public License v3.0
352 stars 128 forks source link

Downloading an octect-stream type file instead of displaying #66

Closed N4DAR closed 4 years ago

N4DAR commented 5 years ago

Ok, erm, i guess it should be a 'noob issue' but here's the problem: I just set up my server (i meaning my dear friend bloginabox. So with nginx, thing that i'm not familiar with...), installed a plugin to show some connections stats but also wanted to have something for the server status (such as cpu/ram/network load, ...). Aaaand here's the prob: whenever i try to access the web interface, i'm tuck on my 404 blog page and asking me if i wanna download an 'octet-stream' type file which seems to conatin the php code........All i wanted was to display the esm'web when i search 'myurl/monit/', simple thing,huh?

It's a success with the shell version but, yknow, web is prettier :D I know the issue is not really your project but my configs. The thing is i messed up the nginx files a bit too much and i'm lost :( Have any idea? ty

N4DAR commented 5 years ago

Ok, just succeeded to get back to the point where i'm ot downloading anything. But still stuck with the error 404. I must be the same as #24 but i don't think i would be able to change from nginx to apache... Aaaaand again, i'm not familiar with nginx (nor apache tho) and not quite sure about what i shoud do T_T

shevabam commented 5 years ago

Here's a nginx config example:

server {
        listen 80;

        root /var/www/esm;
        index index.php;
        server_name YOUR_DOMAIN_NAME;

        location / {
                try_files $uri $uri/ /index.html;
        }

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
        }

        location ~ /(conf)/ {
                deny all;
        }
}
N4DAR commented 5 years ago

Arg...Tried with your config (a simple one but at least that is one), and checking up my nginx "server blocks"...Still nothing. Sorry to bother you.