Nginx installation and config
Hello.
so i am basicly new to installing webservers (being a website coder mainly) and have recently ordered a debian 7 64bit vps for one of my projects (before always got webhosting). So i installed nginx "apt-get install nginx -y" and put my files id usually have in "htdocs"/www Folder (i use xampp at home for testing) into "usr/share/nginx/www". After that i restarted nginx. But when i go to my servers ip i get "nginx permission denied". Ive heard id need to configure nginx prior to using it e.g. set my servers ip adress so i followed some digital oceans setup guide (im not with digital oceans thougg) but it still wont work. So i installed nginx again now (reset).and now i dont knoe anymore.. what is it basicly i need to edit after installing nginc via apt-get cmd? I also might need zlib enabled but i cant figure out how.
im with backupsy and i heard some guy here @severian @servian ? Runs it but dunno if they do setups?
Kind regards,
Ympker
i appreciate any help!
Comments
I'm suggesting you using shared hosting.
I can't even understand half your post. I think what you're looking for is php, which can be installed by doing:
apt-get install php5
What i am looking for is how to install&configure nginx as it gives me "permission denied" when i enter my vps public ip in the browser after having moved my webfiles in the respective www folder from nginx.
https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-debian-7
I think you should read it
Have you chowned the files to the right user?
wrong path to webroot or the php settings are misconfigured.
example conf for wordpress:
/etc/nginx/nginx.conf:
http://pastebin.com/raw.php?i=swQn59r4
/etc/nginx/conf.d/yoursite.conf:
http://pastebin.com/raw.php?i=6zjKXW0t
I've had my fair share of learning curve with nginx and still don't know enough, but those should help. there can be shit going wrong with caching or wordpress rewrites.
Where would i adjust that
I have a vps and use root. Yes i have.
Thats the one that didnt work for me afaik
@Ympker said:
I didnt get this part:
Change the correct lines in "location./~php $ section".
what should i insrrt there?
see my example config files I included in my settings.
those should let you run provided you have proper stuff installed and php5-fpm settings.
see these for nginx, php5 and mariadb/mysql for install and common issues:
Would be probably better to create a system user for your website and use it to scp files directly in the right place. You'd have to make sure that your user can write to the folder you choose and your webserver can read it (and write if needed).
Then you specify the good folder in your nginx config file.
I recommend to use php-fpm if you need php.
Good luck
Thank you all im looking into it now