Main

février 22, 2008

Plesk 8.3 - Ruby package (gem update)

The package included with Plesk 8.3 (on linux) does not include RDoc. If you try to update gem using the command: gem update --system... the installation will exit with an error. You need to install ruby-rdoc (using yum install ruby-rdoc) and its dependencies before re-running gem update --system. Then it will update Rails and all the other gem to their latest versions.

Plesk 8.3 - ROR app at domain root level

To make the app show up at the document root, we have to create a vhost.conf file in your domain's conf directory, and then use the websrvmng application to regenerate your domain's configuration. Change directory to the domain's conf directory: Code: cd /var/www/vhosts/{domainname.com}/conf/ Create and begin editing a vhost.com file: Code: touch vhost.conf nano vhost.conf Add the following line, replacing data in brackets: Code: DocumentRoot /var/www/vhosts/{domainname.com}/httpdocs/{railsapp}/public Reconfigure the virtualhost using websrvmng: Code: /usr/local/psa/admin/sbin/websrvmng -u --vhost-name={domainname.com} Verify that the following line is in /var/www/vhosts/{domainname.com}/conf/httpd.include (usually at the bottom): Code: Include /var/www/vhosts/{domainname.com}/conf/vhost.conf Restart apache: Code: apache2ctl graceful Visit your site: Code: http://www.{domainname.com}

PLESK 8.3 - RUBY ON RAILS Setup

Ruby on Rails - WORKING This is how I got Ruby on Rails (RoR) working on my Plesk machine. I didn't find any major problems with Plesk's implementation, although it took me about 6 hours of trial-and-error to get it working right. SWSoft - you could seriously use some documentation for each Operating System you support.

First thing's first: In your Plesk control panel, make sure that you have your server updated with Ruby On Rails is installed. To do so, go to Server > Updater and enable "Ruby on Rails Support."

After this, go to your domain, and enable FastCGI, which will allow your site to use RoR.

Change to your httpdocs directory:

Code:

cd /var/www/vhosts/{domainname.com}/httpdocs

Create a basic rails application. To do so, use this command:

Code:

rails {railsapp}

Remember to replace {railsapp} with the name of your application.

Change the file ownership to the domains user/group:

Code:

chown {user}:{group} {railsapp}

Change the permissions on the sessions directory:

Code:

chmod 777 {railsapp}/tmp/sessions

Note: Someone let me know if this is a bad idea ... I don't think it is, but I'm not sure. My system had problems writing to the sessions folder unless I chmod'd 777.

Change directory to your new application and edit your .htaccess file in the public/ directory:

Code:

nano {railsapp}/public/.htaccess

On line 2, change:
Code:

AddHandler fastcgi-script .fcgi

To:
Code:

AddHandler fcgid-script .fcgi

On line 32, change:
Code:

RewriteRule ^(.*)$ dispatch.cgi [QSA,L]

To:
Code:

RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

Test your installation. Go to http://www.{domainname.com}/{railsapp}/public/

You should see the standard "Welcome Aboard" Rails index page.

octobre 06, 2007

Cloning VM by hand on VMWARE ESX Server v3.0.1

I’ve had time this week to get familiar with our test server environment which is a rather old Dell server running VMWare ESX Server 3.0.1. After creating a new VM and getting a base linux OS configured, I wanted to clone it for later use. I’ve used VMWare Workstation and VMWare Server before and the cloning process there is very simple–just copy. On ESX Server, there are a couple more steps required and then some other steps that are optional, but make life easier in the long run.

Continue reading "Cloning VM by hand on VMWARE ESX Server v3.0.1" »

mai 17, 2007

How to extract a file from Plesk 8.1.1 backup

Mpack tool is required in this case to work with MIME files. I have FC4 and got this package from here:

https://sourceforge.net/project/sho...lease_id=137934

You can find there as RPM as well as source RPM packages. So instructions are simple:

Create an empty directory to restore the back up file:

  1. mkdir recover
  2. cd recover

Create ungzipped copy of the backup in the current directory.
# gunzip < /PATH_TO_BACKUP/BACKUP_FILE > domain-backup.mime

Run munpack to extract content of directories from the backup file
# munpack domain-backup.mime
# ls -al

Untar the needed directory. For example if you need to restore httpdocs:

#mkdir httpdocs/
# tar xvf DOMAIN.TLD.httpdocs -C httpdocs/

In destination directory - httpdocs you should get all files.

octobre 02, 2006

Install GoDaddy Turbo certificate on PLESK 8.0

Here are some instructions to help you out on your Intermediate certificate install.

1. There is a button in the middle of the page labelled 'Browse'. Click
'Browse' and navigate to the location of the saved site certificate you
received from Starfield. Selecting it, then select 'Send File', this will
upload and install the certificate against the corresponding Private Key.
2. The certificate name will now appear in the list of certificates at the
bottom of the page.
3. Click on the name of the Certificate from the list.
4. The box on the page labelled 'CA Certificate'. You will need to paste
both the Starfield intermediate certificate and ValiCert root certificates
from the .zip file you have received into this box.

They must be pasted this in order, the Starfield intermediate
certificate first, followed by the ValiCert root certificate, the result will
look similar to the example below (Please note: no blank line between
then end of one certificate and the start of the next):

-----BEGIN CERTIFICATE-----
MIIEQTCCA6qgAwIBAgICAQQwDQYJKoZIhvcNAQEFBQAwgbsxJD
AiBgNVBAcTG1Zh
bGlDZXJ0IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVm
FsaUNlcnQsIElu
Yy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IF
ZhbGlkYXRpb24g
QXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZX
J0LmNvbS8xIDAe
BgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTA0MD
ExNDIxMDUyMVoX
DTI0MDEwOTIxMDUyMVowgewxCzAJBgNVBAYTAlVTMRAwDgYDVQ
QIEwdBcml6b25h
MRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZm
llbGQgVGVjaG5v
bG9naWVzLCBJbmMuMTAwLgYDVQQLEydodHRwOi8vd3d3LnN0YX
JmaWVsZHRlY2gu
Y29tL3JlcG9zaXRvcnkxMTAvBgNVBAMTKFN0YXJmaWVsZCBTZW
N1cmUgQ2VydGlm
aWNhdGlvbiBBdXRob3JpdHkxKjAoBgkqhkiG9w0BCQEWG3ByYW
N0aWNlc0BzdGFy
ZmllbGR0ZWNoLmNvbTCBnTANBgkqhkiG9w0BAQEFAAOBiwAwgY
cCgYEA2xFDa9zR
aXhZSehudBQIdBFsfrcqqCLYQjx6z59QskaupmcaIyK+D7M0+6
yskKpbKMJw9raK
gCrgm5xS4JGocqAW4cROfREJs5651POyUMRtSAi9vCqXDG2jim
o8ms9KNNwe3upa
JsChooKpSvuGIhKQOrKC1JKRn6lFn8Ok2/sCAQOjggEhMIIBHTAMBgNVHRMEBTAD
AQH/ MAsGA1UdDwQEAwIBBjBKBgNVHR8EQzBBMD+gPaA7hjlodH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XV0aG9yaXR5MSEwHw
YDVQQDExhodHRw
Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEW
luZm9AdmFsaWNl
cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOn
HK5avIWZJV16vY
dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl
6zfN1SLUzm1NZ9
WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS
v4dk+NoS/ zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt
/UG9v
UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQ
C1u+mNr0HZDzTu
IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC
W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
-----END CERTIFICATE-----

5. Click the 'Send Text' button.
6. Now click 'Up Level' from the top right of the screen and choose
'Setup'.
7. At the top of the page, change the 'SSL Certificate' drop-down
menu to the certificate you have just installed.
8. Click the 'Server' item from the left hand menu.
9. Click on the 'Service Management' menu item.
10. You now need to Stop and Start the Apache process.

NOTE: Restarting Apache will NOT work. You must stop the service, then
start it again to complete the installation

Good luck!

janvier 24, 2005

liste des Hostspots de Montréal

http://auth.ilesansfil.org/hotspot_status.php

avril 01, 2004

Webdav on Plesk 6

vhost.conf: code: AuthType Digest AuthName iCal AuthDigestFile "/home/httpd/vhosts/domain.com/dav.digest.passwd" require valid-user DAV On Order allow,deny Allow from All Options All Then add a user (if it's not the first user, drop the -c) from the prompt in /home/httpd/vhosts/domain.com/ : code: htdigest -c dav.digest.passwd iCal username chmod the DAV enabled directory for writing. This could be a security issue. Cgi scripts and telnet sessions from other users on the server will be able to write to this directory, however apache will not let anyone but the users you create above write through http. code: chmod 777 /home/httpd/vhosts/domain.com/httpdocs/ical

Plesk 6 special config in vhost.conf files

In Plesk 6.0 you can create a vhost.conf files in the virtualhosts domain directory to configure some special Apache directive: 1- create the vhost.conf files in /home/httpd/vhosts/mydomain.com/conf/vhost.conf 2- run /usr/local/psa/admin/bin/my_apci_rst which will force Plesk to discover its existence and bind it into the httpd.include. 3- restart Apache for the changes to take effect.

janvier 15, 2004

PSA fullserver backup

SWSoft Forum - Backup Restore How do I make a fullserver backup with ip's etc. everything and restore it on another clean plesk 6 server without losing any up to date data?
/usr/local/psa/bin/psadump -F -f - | split -b 1000m - dump.
backup your old plesk system and restore to another clean pesk system using
cat dump.* | /usr/local/psa/bin/psarestore -m map_file -s shells_map_file -f -