Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject:
PostPosted: Wed Feb 22, 2012 7:47 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Your old nginx is still running. No wonder the changes you made to the new nginx configuration isn't being respected.

Kill the old, zombie nginx with a clean head shot:
Code:
kill -9 1945
kill -9 1947

Then restart the new nginx:
Code:
/etc/init.d/nginx restart


Top
   
 Post subject:
PostPosted: Thu Feb 23, 2012 4:13 pm 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
Consider the zombie nginx server as killed.

However, derp.doodleskull.com still shows a 404. Now it's just powered by nginx 0.7.65.

Since I've pointed the subdomain to 178.79.162.39, which is my Linode IP, so from my understanding it's not the problem here. On the other hand, it was my understanding that created this server apocalypse mess, so I'm not the one to say anything at this point.

But it would seem that's something's messed up either in my 'doodleskull' file in /etc/nginx/sites-available or I've put my site files in the wrong directory. Currently they're at /srv/doodleskull.com/public_html/.

I don't know. I took a photo of myself just a minute ago, maybe it will provide more valuable information:

Image


Last edited by doodleskull on Thu Feb 23, 2012 4:16 pm, edited 2 times in total.

Top
   
 Post subject:
PostPosted: Thu Feb 23, 2012 4:13 pm 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
Killed also the double reply.


Top
   
 Post subject:
PostPosted: Thu Feb 23, 2012 4:37 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Well, at least you ended the zombie apocalypse, so it may be possible to rebuild the world!

Some observations:
- According to your last post on page 1 of this thread, there seems to be a proper symlink from sites-available to sites-enabled. So that's not the problem.
- Typing derp.doodleskull.com into a browser produces a different result from typing 178.79.162.39 into a browser ("Welcome to nginx!") so apparently nginx knows that this subdomain should be treated differently.
- If there were problems with file permissions, the response would be 403, not 404. So permissions are not the issue here.
- If the directory existed but there was no index.html in there, nginx would return 403, not 404. So that's not the case, either.
- Which brings us back to the directory structure:

1) In a previous post, you said you had the following line in the doodleskull file:
Code:
root /where/i/believe/my/site/is/located/but/dont/really/have/a/clue; 

Is this exactly the same as /srv/doodleskull.com/public_html ? No typos, no weird characters in between, no unnecessary slash at the end?

2) One way to diagnose errors is to see if you can get the same program to produce a different error. Try pointing the line quoted above at non-existent paths like /herp/derp, or forbidden paths like /root. Restart nginx after every change. Does this cause the error message to change?

3) What does /srv/doodleskull.com/public_html actually contain? Please do an "ls -la" in that directory and post the results here.


Top
   
 Post subject:
PostPosted: Thu Feb 23, 2012 4:59 pm 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
Quote:
Is this exactly the same as /srv/doodleskull.com/public_html ?


Yup, that would be the same.

Quote:
Try pointing the line quoted above at non-existent paths like /herp/derp


Gives still a 404.

These are the files in the /srv/doodleskull.com/public_html folder:

Code:
total 104
drwxr-xr-x 17 root root  4096 2012-02-23 14:45 .
drwxrwxrwx  4 root root  4096 2012-02-12 05:53 ..
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 about
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 archives
-rw-r--r--  1 root root 17404 2012-02-21 10:06 atom.xml
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 bird-hate
-rw-r--r--  1 root root  1406 2012-02-21 10:06 favicon.png
drwxr-xr-x  4 root root  4096 2012-02-21 10:06 files
drwxr-xr-x  2 root root  4096 2012-02-21 10:07 fonts
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 hello
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 images
-rw-r--r--  1 root root  5549 2012-02-21 10:06 index.html
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 javascripts
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 movie-titles
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 nice
-rw-r--r--  1 root root  1607 2012-02-21 10:06 sitemap.xml
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 stylesheets
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 sucks
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 vacation-to-do
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 videos
drwxr-xr-x  2 root root  4096 2012-02-21 10:06 zombie-hangover


Standing by for orders. Over.


Top
   
 Post subject:
PostPosted: Thu Feb 23, 2012 5:58 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Hmm, perhaps the minimal configuration I gave you at the beginning was too minimal? I did that because my usual template relies on features that may not be available on nginx 0.7.65. (The preferred method for handling document roots and a few other things have changed in the last couple of years.) But maybe I shouldn't have left out the following block:
Code:
location / {
    root  /srv/doodleskull.com/public_html;
    index  index.html;
}

Put it right after the "root" line, inside the server { } block. Restart nginx. Any difference?

Edit: Added missing semicolon.


Top
   
 Post subject:
PostPosted: Thu Feb 23, 2012 6:16 pm 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
Code:
location / { 
    root  /srv/doodleskull.com/public_html;
    index  index.html;
}


Not any difference, no.

The "Welcome to nginx!" index.html is in /var/www/nginx-default directory. How /srv/doodleskull.com/public_html and /var/www/nginx-default are connected?

Could I rsync my Octopress generated site to the /var/www/nginx-default folder or will it make the server a zombie again?


Top
   
 Post subject:
PostPosted: Thu Feb 23, 2012 7:02 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
OK, last resort: back up /var/www/nginx-default first, and then move your site to /var/www/nginx-default, and temporarily delete the "doodleskull" symlink from /etc/nginx/sites-enabled. (You can leave it in /etc/nginx/sites-available.) This will probably cause nginx to serve the same material no matter which domain you use, even the bare IP address. This is OK until you need to add a second website.

Alternatively, you could try editing /etc/nginx/sites-available/default and change all references to /var/www/nginx-default to a more convenient location.

I'm seriously running out of ideas as to why nginx is not finding your website files in its current location. Maybe the zombie outbreak left some subtle damages to your ecosystem, causing oceans to turn grey or something.


Top
   
 Post subject:
PostPosted: Fri Feb 24, 2012 6:10 am 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
Alternatively, I could just have used Apache instead of nginx in the first place. I just had this grandiose idea that nginx would be better for me than Apache.

People have written tutorials all over the web specificly for Linode + Octopress with Apache, Matt Gemmell posted even his .htaccess file for reference if I remember correctly. So should this nginx installation go even more south at some point, I can always start again with a clean Apache installation. I've got a local copy of my site at all times, so it doesn't matter where or what on top of I put it.

Quote:
This will probably cause nginx to serve the same material no matter which domain you use, even the bare IP address. This is OK until you need to add a second website.


No need for a second site. If I'll need a second website, I'll open a separate Linode account for it.

Quote:
I'm seriously running out of ideas as to why nginx is not finding your website files in its current location.


Thanks for assisting this far. I really am thankful of all the help I've gotten in this thread.

I'll do the steps later today when I get home that you suggested on your last message and post an update on how it went.


Top
   
 Post subject:
PostPosted: Fri Feb 24, 2012 11:53 am 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
doodleskull wrote:
Alternatively, I could just have used Apache instead of nginx in the first place. I just had this grandiose idea that nginx would be better for me than Apache.

Maybe. You know, at least you didn't have a zombie outbreak involving Apache.

But it's not your fault -- There are too many tutorials out there, including Linode's own, that talk about compiling nginx from source as if that was the natural way to install it on Ubuntu. No, apt-get (or aptitude) is the only natural way to install anything on Ubuntu, and compiling should be the last resort for packages that aren't in the repositories. Those tutorials should come with a big warning, but they don't.

As a result, somebody messes up their nginx installation and cries for help on this forum every other month, and what could have been a 5-minute quick fix turns into an unmanageable mess. This was exactly the kind of mess that standardized binary-based distros such as Ubuntu were supposed to help you avoid! You're just another casualty of the compiler-happy tutorial writers.

How to install Apache: apt-get install apache2
How to install nginx: apt-get install nginx
If you really need the latest version, use a more recent version of Ubuntu.
Anything else should be seen with the utmost suspicion.

/rant

Anyway, good luck with your skull doodling!


Top
   
 Post subject:
PostPosted: Fri Feb 24, 2012 6:10 pm 
Offline
Senior Member
User avatar

Joined: Wed Mar 17, 2004 4:11 pm
Posts: 554
Website: http://www.unixtastic.com
Location: Europe
Code:
root      1945  0.0  0.1   4760   656 ?        Ss   Feb12   0:00 nginx: master p
nginx     1947  0.0  0.2   5088  1432 ?        S    Feb12   0:00 nginx: worker p


That looks like the old server you compiled. Kill it with:

Code:
kill 1945 1947


Then start the ubuntu packed one with:

Code:
/etc/init.d/nginx start



EDIT: Oh sorry, Didn't see this thread had already run into a second page.


Top
   
 Post subject:
PostPosted: Sat Feb 25, 2012 4:00 pm 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
Now I can't get the browser even to connect to my Linode.

178.79.162.39 = nothing when typed to browser

li300-39.members.linode.com = nothing

derp.doodleskull.com = you guessed it, nothing

I started to ass around with Linode backups after hybinet said I should backup certain directories. I should have backed the directories up manually. I however have Linode backups, which I thought I could use but the control panel or whatever said that I don't have enough space on my disk if I want to use the backups.

That's why I needed to turn my Linode off, resize the disk for retrieving something from the backups. After I did this, and visited derp.doodleskull.com, nothing came up. The browser can't connect to my Linode.

Eventually I went and rebuilt my Linode installation. Now I've got nginx installed (the proper way with apt-get) but still, nothing.

I'm aware than I suck with this server stuff more than Bieber sucks with music. That's a lot. But still, the guides for doing this stuff could be simpler. For reference, even the rough guide for building a space shipseems simpler.

It can't be like
Quote:
"Wanna set up a server? Well, that should be no biggie. Just study Terminal commands for 17 years at first, and then read this 'Getting started guide' which has 5647 pages. Then, you'll be ready to start to build your first server. That'll eat up something between 34 and 46 years from your calendar. After that, you're done. Now you can set up your site. Happy blogging."


Oh jesus, how can get my website up? Maybe in the next life.


Top
   
 Post subject:
PostPosted: Sat Feb 25, 2012 4:18 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
At this moment, your server loads the "Welcome to nginx!" page no matter which domain I request. This page is stored in /var/www/nginx-default, right? (More recent versions of nginx have it in /usr/share/nginx/www, so check that out as well, though I'm pretty sure Ubuntu 10.04 uses the old location.) Try replacing the index.html file in this directory with the index.html file from your static site. Or even just edit it directly and insert some gibberish after the "Welcome to nginx!" message. Any change?


Top
   
 Post subject:
PostPosted: Sat Feb 25, 2012 4:20 pm 
Offline
Junior Member

Joined: Thu Feb 16, 2012 6:06 am
Posts: 22
Website: http://doodleskull.com
Location: Helsinki, Finland
Okay I started nginx with "/etc/init.d/nginx start" and now it seems to be working, I get the 'Welcome to nginx!" message. Although, in my case it should say "Welcome to hell!"

Let see how long I can manage the keep things calm before the next 18,9 richter server earthquake comes for a visit.

See you in the next episode of "Stupid zombie n00b setting up zombie servers" on Linode forums! Every day at 7pm PST time!


Top
   
 Post subject:
PostPosted: Sun Feb 26, 2012 3:36 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
doodleskull wrote:
See you in the next episode of "Stupid zombie n00b setting up zombie servers" on Linode forums! Every day at 7pm PST time!

You're drawing webcomics with skulls and other dead-looking characters in them. What else did you expect would happen to your server? You jinxed yourself. :twisted:


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


Who is online

Users browsing this forum: No registered users and 1 guest


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