Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Domain/Wordpress setup
PostPosted: Thu Jan 12, 2012 3:38 pm 
Offline
Senior Newbie

Joined: Thu Jan 12, 2012 3:35 pm
Posts: 6
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/web-applicati ... /wordpress


Top
   
 Post subject:
PostPosted: Thu Jan 12, 2012 4:33 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Works for me I see

Welcome to nginx! xxx

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Thu Jan 12, 2012 4:39 pm 
Offline
Senior Newbie

Joined: Thu Jan 12, 2012 3:35 pm
Posts: 6
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.


Top
   
 Post subject:
PostPosted: Thu Jan 12, 2012 4:40 pm 
Offline
Senior Member

Joined: Wed Dec 01, 2010 10:39 am
Posts: 71
Website: http://www.pannix.net
Location: Belgium
I found this one very useful:
http://www.howtoforge.com/running-wordpress-on-nginx-lemp-on-debian-squeeze-ubuntu-11.04


Top
   
 Post subject:
PostPosted: Thu Jan 12, 2012 4:40 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
change the "root" parameter to the path of your wordpress installation.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Thu Jan 12, 2012 5:05 pm 
Offline
Senior Newbie

Joined: Thu Jan 12, 2012 3:35 pm
Posts: 6
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?


Top
   
 Post subject:
PostPosted: Thu Jan 12, 2012 5:10 pm 
Offline
Senior Member

Joined: Wed Dec 01, 2010 10:39 am
Posts: 71
Website: http://www.pannix.net
Location: Belgium
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.


Top
   
 Post subject:
PostPosted: Thu Jan 12, 2012 5:22 pm 
Offline
Senior Newbie

Joined: Thu Jan 12, 2012 3:35 pm
Posts: 6
Yes, I've reloaded and restarted


Top
   
 Post subject:
PostPosted: Thu Jan 12, 2012 6:13 pm 
Offline
Senior Member

Joined: Wed Dec 01, 2010 10:39 am
Posts: 71
Website: http://www.pannix.net
Location: Belgium
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.


Top
   
 Post subject:
PostPosted: Thu Jan 12, 2012 7:49 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Post your nginx configuration.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Fri Jan 13, 2012 3:12 am 
Offline
Senior Newbie

Joined: Thu Jan 12, 2012 3:35 pm
Posts: 6
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;
fastcgi_param SCRIPT_FILENAME /srv/www/findmill.co.uk/public_html$fastcgi_script_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;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_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;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 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
#
# # 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;
# }
#}


Top
   
 Post subject:
PostPosted: Fri Jan 13, 2012 4:59 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Move root outside the location block and into the server block just below error_log then restart nginx.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Fri Jan 13, 2012 2:18 pm 
Offline
Senior Newbie

Joined: Thu Jan 12, 2012 3:35 pm
Posts: 6
Thanks a lot! That seems to have done the trick! Thanks for your help!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group