Booting two linode configuration profiles at the same time?

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

18 Replies

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.

Thanks – I'll give that a try!

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

/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.

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

Try linking manually ln -s /etc/apache2/sites-available/bookgenius.org /etc/apache2/sites-enabled/bookgenius.org then restart apache

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.

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 netstat -lpnt and iptables -L -n -v

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.

check the contents of your apache error log

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#

Try binding apache specifically to your linode's ip address

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

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!)

Checkout http://httpd.apache.org/docs/2.2/mod/co … irtualhost">http://httpd.apache.org/docs/2.2/mod/core.html#virtualhost you put the ip in the virtualhost instead of * you also will want to check out if it's listening on the ip which is in /etc/apache2/ports.conf i.e. Listen 72.14.179.185:80 and NameVirtualHost 72.14.179.185:80

I see another clue in the contents of ports.conf, specifically about having to do certain things when upgrading from Etch:

If you just change the port or add more ports here, you will likely also

have to change the VirtualHost statement in

/etc/apache2/sites-enabled/000-default

This is also true if you have upgraded from before 2.2.9-3 (i.e. from

Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and

README.Debian.gz

NameVirtualHost *:80

Listen 80

# If you add NameVirtualHost *:443 here, you will also have to change

the VirtualHost statement in /etc/apache2/sites-available/default-ssl

to # Server Name Indication for SSL named virtual hosts is currently not

supported by MSIE on Windows XP.

Listen 443

Listen 443

So far, I'm stumped. It might make more sense for me to start at the beginning with a new Squeeze profile, and get the web sites up and running before doing anything else.

Thanks again!

OK, I got the virtual server working! (I had neglected to restart and reload the apache server. I think that was the problem. I also carefully followed the steps outlined at http://library.linode.com/web-servers/a … al-hosting">http://library.linode.com/web-servers/apache/installation/debian-6-squeeze#sph_configure-apache-for-named-based-virtual-hosting)

I do have a question: when I did reload the server, I got these warnings:

root@everything:~# /etc/init.d/apache2 restart

Restarting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

[Thu Dec 15 15:35:30 2011] [warn] NameVirtualHost *:80 has no VirtualHosts

… waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

[Thu Dec 15 15:35:32 2011] [warn] NameVirtualHost *:80 has no VirtualHosts

.

I'm not quite sure what the warning means. I do see content from the web site in my browser now, so I know it's working.

  • Chris

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