This blog is NOFOLLOW Free!

You're browsing: Home » Hosting, HowTo, Tutorials » Blog article: HOWTO: LiteSpeed on SliceHost

HOWTO: LiteSpeed on SliceHost

This is a short text how to create new page on VPS, Slicehost. It was write by my friend Dru who helped me setup my VPS.

When i am starting new project, website i do like this:

1. Create user

a.) create a user using webmin

- Click on System in the sidebar, then on users and groups
- Click on create new user
- for the username ALWAYS use the domain name for the name of the user. So in this case: example.org do the same for the group (choose new group and name it the same way - THIS IS VERY IMPORTANT)
- then click save

When you create the user in webmin there should be a field where you can set the group, that will let you pick the www-data group before you create the user.

b.) shell method

I use this one: adduser username –ingroup www-data –force-badname

where username = whatever you want the user to be called, ie

adduser example.org –ingroup www-data –force-badname

2. Create LiteSpeed folders

Now you need to FTP in (don’t use ssh or sftp it has to be ftp). (use the server ip, the username will be whatever you called the user and the password will be whatever you configured)

Once you’ve done that create the following folders: config public_html cgi-bin

3. New site in LiteSpeed

Login to litespeed http://your_IP/index.php (user: **** password: ****)

Go to configuration, then virtualhost templates.
Click on PHP_SuEXEC

Where it says Member Virtual Hosts click the add link to the right of it, then fill in the following:

- virtualhost name - should be the domain name (example.org)
- domain name - should be the same as the above
- aliases - should be the same as the above except with www. at the start (www.example.org)
- virtualhost root - Leave Blank

Save, and then go to actions and graceful restart to restart the webserver.

FTP your files into the public_html folder and you should be able to access them in your browser.

4. Importing Databases when you move website between hostings

First create a blank database with phpmyadmin.

Then in the commandline, navigate to the folder where the sql file is. Then do this command:

mysql -u user -p user_dbname < file.sql

where dbname = name of the blank database
where file.sql = the SQL file you're importing.

It will ask you for the root password and then in a few seconds it'll be done.

5. BONUS TIPS & TRICKS

a.) How to move files when migrating to new server ?

On old server backup files with tar, you use one command line to backup all files to one tar or tar.gz file.

Put this file in public_html folder on this server. Next go to new server and:

wget link_to_the_gzip_file_on_the_old_server

Next untar the files to proper place and that is it.

b.) Problem with file permissions

Sometimes when i move files from one server to another i got problems with file permissions on new server. To fix I use this method:

cd /home/example.org

and then do

chown -R example.org:www-data public_html

and then

chmod 770 -R public_html.

c.) MySQL problem with coding, default charset

Sometimes i got problem (Wordpress UTF-8 Charset Woes) with coding in sql base, there was strange coding problems in text and i need to fix that. I use this solution:

$ mysql –user=frog -p –execute=”DROP DATABASE dbname;
CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;”

$ mysql –user=frog –max_allowed_packet=16M -p –default-character-set=utf8 dbname < dump_utf8.sql

and it works for me..

To find more about this one look here: Convert latin1 to UTF-8 in MySQL

So good luck with great hosting Slicehost and webserver LiteSpeed, for me it works really great !

If you enjoyed this post, make sure you subscribe to my RSS feed!

Related Entries

Subscribe

Keep updated with future posts by subscribing to SilentBits through RSS or email.

0 Responses to “HOWTO: LiteSpeed on SliceHost”


  1. No Comments yet, your thoughts are welcome

Subscribe to Comments

Feed for this Entry RSS Feed-Comments

Leave a Reply