Domain/Wordpress setup

Hello,

I completely new to Linode and Linux. Just been trying out hosting a Wordpress site using a domain. I've gone quite a few documentation pages but I'm stuck with something.

I've registered my domain ( http://www.findmill.co.uk ) and trying to host it in Nginx but I can't seem to connect the website from browser. Keep getting "could not connect " errors. Strangely, I could connect a few minutes ago and I was getting "Welcome to nginx" page. So, I don't think it's a domain registration issue. I just can't browse to any of the pages that I have got under srv/www/findmill.co.uk/public_html

Any help will be appreciated.

I've been following these docs:

http://library.linode.com/lemp-guides/u … 0.04-lucid">http://library.linode.com/lemp-guides/ubuntu-10.04-lucid

http://library.linode.com/web-applicati … /wordpress">http://library.linode.com/web-applications/cms-guides/wordpress

12 Replies

Works for me I see

Welcome to nginx! xxx

Thanks! I figured it out - it was because I had accidently deleted my default config file! Silly me!

Any ideas how do I point nginx to my public_html folder rather than this static HTML file? I want the domain to point to the Wordpress folder.

I found this one very useful:

~~[http://www.howtoforge.com/running-wordpress-on-nginx-lemp-on-debian-squeeze-ubuntu-11.04" target="_blank">](http://www.howtoforge.com/running-wordp … untu-11.04">http://www.howtoforge.com/running-wordpress-on-nginx-lemp-on-debian-squeeze-ubuntu-11.04](

change the "root" parameter to the path of your wordpress installation.

It's already pointing there:

location / {

root /srv/www/findmill.co.uk/public_html;

index index.html index.htm;

}

Do I need to delete the index.html file from where this welcome message is coming?

Have you reloaded nginx after every change to config file (nginx and vhosts)?

Read somewhere that you should put root outside of location block. Don't know if it is just best practice.

Yes, I've reloaded and restarted

Have a look at the access and error log for your vhost (wherever you put them) and the access and error log of nginx in /var/log/nginx/ and post any error messages here.

Newbie myself, site went live on my LEMP 2 weeks ago.

Post your nginx configuration.

Here's my findmill.co.uk:

server {

listen 80;

server_name www.findmill.co.uk findmill.co.uk;

access_log /srv/www/findmill.co.uk/logs/access.log;

error_log /srv/www/findmill.co.uk/logs/error.log;

location / {

root /srv/www/findmill.co.uk/public_html;

index index.html index.htm;

}

location ~ .php$ {

include /etc/nginx/fastcgi_params;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgiparam SCRIPTFILENAME /srv/www/findmill.co.uk/publichtml$fastcgiscript_name;

}

}

And here's my nginx.conf: The only change I've made to it is this added this line: include /etc/nginx/sites-enabled/*;

user www-data;

worker_processes 4;

pid /var/run/nginx.pid;

events {

worker_connections 768;

multi_accept on;

}

http {

#

Basic Settings

#

sendfile on;

tcp_nopush on;

tcp_nodelay on;

keepalive_timeout 65;

typeshashmax_size 2048;

server_tokens off;

servernameshashbucketsize 64;

servernamein_redirect off;

include /etc/nginx/sites-enabled/*;

include /etc/nginx/mime.types;

default_type application/octet-stream;

#

Logging Settings

#

access_log /var/log/nginx/access.log;

error_log /var/log/nginx/error.log;

#

Gzip Settings

#

gzip on;

gzip_disable "msie6";

gzip_vary on;

gzip_proxied any;

gzipcomplevel 6;

gzip_buffers 16 8k;

gziphttpversion 1.1;

gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

#

Virtual Host Configs

#

include /etc/nginx/conf.d/*.conf;

include /etc/nginx/sites-enabled/*;

}

mail {

# See sample authentication script at:

# http://wiki.nginx.org/ImapAuthenticateW … ePhpScript">http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript

#

# auth_http localhost/auth.php;

# pop3_capabilities "TOP" "USER";

# imap_capabilities "IMAP4rev1" "UIDPLUS";

#

server {

listen localhost:110;

protocol pop3;

proxy on;

}

#

server {

listen localhost:143;

protocol imap;

proxy on;

}

}

Move root outside the location block and into the server block just below error_log then restart nginx.

Thanks a lot! That seems to have done the trick! Thanks for your help!

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