New to linode and linux

Hey guys, I spent the last 18 hours going thru the tutorial and have manage to get nginx installed with lemp. i installed nginx from source. i have /etc/nginx and /opt/nginx?? whats the difference, but i made sure both had identical codes.

My problem is, the tutorial told me to use /srv/www/domain.com

so i change all my nginx.conf and related files to reflect that but upon going to my own www.domain.com, it displays welcome to nginx and after an hour i realized it was pointing to /var/www/nginx-default/index.html., and without the WWW in front of domain.com it goes to /opt/nginx/html/index.html?

so what do i have to do to be able to use /srv/www/domain.com only?

and for users it says…

user nobody;

worker_processes 1;

some tutorials tell me to do www-data www-data, and others are nginx nginx, so how do i find out what user to use?

thanks in advance. i really did try to figure it out and searched google and forum before posting,

3 Replies

If you are new for nginx try this lnmp auto installer! How ever its basically support for only one site hosted in the server. Here is full guide for installing lnmp and configuring it for total wordpress support-

~~[http://www.ruchirablog.com/nginxmysqlphpfpm-auto-installer-centos-5-debian/" target="_blank">](http://www.ruchirablog.com/nginxmysqlph … -5-debian/">http://www.ruchirablog.com/nginxmysqlphpfpm-auto-installer-centos-5-debian/](

~~[http://www.ruchirablog.com/complete-nginx-setup-for-wordpress/" target="_blank">](http://www.ruchirablog.com/complete-ngi … wordpress/">http://www.ruchirablog.com/complete-nginx-setup-for-wordpress/](

i won't be using wordpress… plus the intructions aren't for ubuntu.. but thank you for replying

is there anyone that can help me resolve my problem?

If you're using Ubuntu, why are you compiling nginx yourself? Do you need some features from the absolute latest version? Otherwise, just do "apt-get install nginx" and everything should be configured properly.

Ubuntu and other Debian-based distributions use a different filesystem layout than what most source code tarballs assume. This can lead to files being deposited in unexpected places when installed from source.

On Debian/Ubuntu, everything web-related is run by the user "www-data" (which may have some security benefits over nobody) and served from "/var/www" by default. It's just a convention, and you don't have to follow it, but you'd have to be careful with file permissions and such.

BTW, the www problem can probably be solved by adding the www version of your domain to the "server_name" line of your website configuration and reload it. Otherwise, nginx will treat the www version and the non-www version as different websites.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct