Rhel5 PHP 5.2.5

Posted by alex almazan Wed, 09 Jan 2008 12:05:00 GMT

PHP 5.2.5 source(s) for compiled PHP modules such as MhAsh McryPt and MSsQL:

ftp.pbone.net:/mirror/remi.collet.free.fr/rpms/el5.i386

ftp.pbone.net/mirror/remi.collet.free.fr/rpms/el5.x86_64

lftp works best ie.

lftp ftp.pbone.net:/mirror/remi.collet.free.fr/rpms/el5.i386

Quick Plesk Rails

Posted by alex almazan Mon, 31 Dec 2007 20:52:00 GMT

To install on your site an application written in Ruby:

1. On your Home page, select the domain name you need, then, under Hosting, click Setup.

2. Select the CGI and FastCGI check boxes, and click OK.

3. Connect to your FTP account, change to the httpdocs directory.

4. Upload the application files to the httpdocs/ directory.

5. Create a file with name .htaccess in this directory, open it with a text editor of your choice and add the following lines into the file:

RewriteEngine On
RewriteRule ^$ /public/index.html [L]
RewriteCond %{REQUEST_URI} !^/public
RewriteRule ^(.*)$ /public/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ public/dispatch.fcgi/$1 [QSA,L]

6. Save the file.

7. Remove the file public/.htaccess

8. Open the file public/dispatch.fcgi with a text editor and put the following lines there
#!/usr/bin/ruby

9. Save the file.

Now the web application will be accessible at the following URL: http://yourdomain.com/.

Hot Linking

Posted by alex almazan Mon, 31 Dec 2007 19:00:00 GMT

You can stop hot linking into your sites by creating a .htaccess file with the following syntax; however, this requires that your servers supports mod_rewrite

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]

The syntax will show a broken link when anyone tries to hot link any of your .gif and .jpg files. Please note that you willl need to replace domain.com with your domain name. In addition, you can redirect the hot link to a picture of your choice by adding the following syntax instead:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.domain.com/picture-of-choice.jpg [R,L]

This syntax will redirect all hot links to the picture named picture-of-choice.jpg located at domain.com.

Quick Basic Authentication

Posted by alex almazan Mon, 31 Dec 2007 18:33:00 GMT

Within the servers Apache configuration, find the directives involving the virtual host you are targeting. Edit the configuration and add statements consisting of

<Directory /full/path/to/directory/to/password/protect>
AllowOverride All
</Directory>

The ‘AllowOverride’ directive tells apache to read the .htaccess file in the specified directory.Inside the directory that has been specified for the password protection, create an .htaccess file

Enter the following text in the .htaccess file

AuthName "Title edit as needed" 
AuthType Basic
require valid-user
AuthUserFile /full/path/to/.htpasswd
Once this is in place, create the .htpasswd file called for by the .htaccess file just created. To create the password file that will contain the username and password for the login, use the following command (It is adviseable to place this file outside of a location served by the web server)
/usr/bin/htpasswd -c /full/path/to/.htpasswd username

Enter the password for the user when prompted.

Finally, restart Apache.