Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Dec 13, 2011 3:00 pm 
Offline
Senior Newbie

Joined: Mon Dec 12, 2011 11:13 am
Posts: 14
I currently have two configuration profiles on my Linode. One is an older Debian Lenny system, the other a newer Squeeze configuration

I'm currently in the process of moving files from one to the other. I'd like to be able to use my SSH client software to log on to both profiles, so I can move files around before making the final switchover. Is there any way to be able to run both profiles at once? Failing that, is there an efficient way to copy files from one profile to the other?

Also, is there a FAQ on the forums explaining the best way to switch web site URLs from one configuration to another?

Thanks,

- Chris


Top
   
 Post subject:
PostPosted: Tue Dec 13, 2011 3:38 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
No you can't boot both at the same time.

To move files from one to the other (say lenny to squeeze), edit the profile for squeeze and add the root lenny drive as another parition, boot into the squeeze profile and mount the lenny drive, then you can simply copy the files using cp.

Switching websites shouldn't be a problem if they're both the same configuration they will also share the same ip, so as long as your webserver configurations are the same it should work fine.

_________________
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: Tue Dec 13, 2011 3:42 pm 
Offline
Senior Newbie

Joined: Mon Dec 12, 2011 11:13 am
Posts: 14
Thanks -- I'll give that a try!


Top
   
 Post subject:
PostPosted: Wed Dec 14, 2011 1:43 pm 
Offline
Senior Newbie

Joined: Mon Dec 12, 2011 11:13 am
Posts: 14
Hi,

I finished copying my files to the Squeeze profile. Just as a sanity check, I left the sites-available and sites-enabled directories with their default values, and added

NameVirtualHost 72.14.179.185:80

to end of apache2.conf

I then pointed my browser to the Linode's numerical URL, and got the Apache default page, so I know Apache is working on the new Squeeze profile.

The problem came after I copied over my sites-available and sites-enabled directories from the Lenny profile, and rebooted. When I typed the following to activate my bookgenius.org website:

a2ensite bookgenius.org

I got this error message:

root@li41-185:/etc/apache2# a2ensite bookgenius.org
ERROR: Site bookgenius.org not properly enabled: /etc/apache2/sites-enabled/bookgenius.org is a real file, not touching it

And, not surprisingly, my browser can't connect to the website. Can you tell me what the problem might be? I suspect I left out a step in enabling the website.

Thanks,

- Chris


Top
   
 Post subject:
PostPosted: Wed Dec 14, 2011 1:45 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
/etc/apache2/sites-enabled/bookgenius.org should be a symlink from /etc/apache2/sites-available/bookgenius.org put the config file in /etc/apache2/sites-available/bookgenius.org, delete /etc/apache2/sites-enabled/bookgenius.org then run a2ensite bookgenius.org and restart apache.

_________________
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: Wed Dec 14, 2011 2:08 pm 
Offline
Senior Newbie

Joined: Mon Dec 12, 2011 11:13 am
Posts: 14
I did all that , then ran a2ensite bookgenius.org again. It worked, and said the site was enabled.

But when I restarted Apache, I still could not connect to the site. I looked in the sites-enabled directory, but didn't see any files there. Hmmm . . .


_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Wed Dec 14, 2011 2:16 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Try linking manually
Code:
ln -s /etc/apache2/sites-available/bookgenius.org /etc/apache2/sites-enabled/bookgenius.org
then restart apache

_________________
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: Wed Dec 14, 2011 2:26 pm 
Offline
Senior Newbie

Joined: Mon Dec 12, 2011 11:13 am
Posts: 14
When I typed that line, I got:

root@li41-185:/etc/apache2# ln -s /etc/apache2/sites-available/bookgenius.org /etc/apache2/sites-enabled/bookgenius.org
ln: creating symbolic link `/etc/apache2/sites-enabled/bookgenius.org': File exists

It turns out there already was a bookgenius.org ORG file in sites-enabled, but I had neglected to refresh the directory when I was looking earlier (sorry!). I rebooted, but still cannot connect to the site.


Top
   
 Post subject:
PostPosted: Wed Dec 14, 2011 2:28 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
bookgenius.org points to 72.14.179.185 assuming that is your linode ip it's not accepting http connections.

What's the output of
Code:
netstat -lpnt
and
Code:
iptables -L -n -v

_________________
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: Wed Dec 14, 2011 2:31 pm 
Offline
Senior Newbie

Joined: Mon Dec 12, 2011 11:13 am
Posts: 14
One more clue. If I use the default apache2.conf file, I can connect to the bookgenius.org site, but I get only the default Apache html page. When I try to swap in my .conf file from my Lenny setup, that's when I am unable to connect to the site at all. So I suspect there must be something in that file that the Squeeze configuration doesn't like.


Top
   
 Post subject:
PostPosted: Wed Dec 14, 2011 2:33 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
check the contents of your apache error log

_________________
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: Wed Dec 14, 2011 2:35 pm 
Offline
Senior Newbie

Joined: Mon Dec 12, 2011 11:13 am
Posts: 14
for netstat:

root@li41-185:/etc/apache2# netstat -lpnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:8004 0.0.0.0:* LISTEN 1575/pazpar2
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1851/mysqld
tcp 0 0 0.0.0.0:49002 0.0.0.0:* LISTEN 1365/rpc.statd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1353/portmap
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1854/sshd
tcp6 0 0 :::80 :::* LISTEN 1586/apache2
tcp6 0 0 :::22 :::* LISTEN 1854/sshd
root@li41-185:/etc/apache2#

For iptables:

root@li41-185:/etc/apache2# iptables -L -n -v
Chain INPUT (policy ACCEPT 185 packets, 16191 bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 158 packets, 27305 bytes)
pkts bytes target prot opt in out source destination
root@li41-185:/etc/apache2#


Top
   
 Post subject:
PostPosted: Wed Dec 14, 2011 2:38 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Try binding apache specifically to your linode's ip address

_________________
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: Wed Dec 14, 2011 2:44 pm 
Offline
Senior Newbie

Joined: Mon Dec 12, 2011 11:13 am
Posts: 14
In var/log/apache2, at the end of the list, I see:

[Wed Dec 14 13:28:20 2011] [notice] Apache/2.2.16 (Debian) mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Wed Dec 14 13:28:27 2011] [error] [client 71.126.224.235] File does not exist: /etc/apache2/htdocs
[Wed Dec 14 13:28:41 2011] [error] [client 71.126.224.235] File does not exist: /etc/apache2/htdocs
[Wed Dec 14 13:32:36 2011] [error] [client 123.125.71.23] File does not exist: /etc/apache2/htdocs
[Wed Dec 14 13:33:12 2011] [error] [client 220.181.108.81] File does not exist: /etc/apache2/htdocs
[Wed Dec 14 13:36:24 2011] [error] [client 71.126.224.235] File does not exist: /etc/apache2/htdocs
[Wed Dec 14 13:37:30 2011] [error] [client 66.249.71.217] File does not exist: /etc/apache2/htdocs
[Wed Dec 14 13:37:30 2011] [error] [client 66.249.71.217] File does not exist: /etc/apache2/htdocs
[Wed Dec 14 13:38:09 2011] [error] [client 66.249.71.133] File does not exist: /etc/apache2/htdocs


Top
   
 Post subject:
PostPosted: Wed Dec 14, 2011 2:55 pm 
Offline
Senior Newbie

Joined: Mon Dec 12, 2011 11:13 am
Posts: 14
Can you tell me how I can bind apache to my linode's ip address -- or perhaps point me to where I can find out? Sorry, I'm new to this aspect of using the Linode.

(Thanks so much for all your help, by the way!)


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