(Updated for Ubuntu 13.10)
Install LAMP
- sudo apt-get install tasksel
- sudo tasksel install lamp-server
- You may also want to install phpmyadmin
, and I needed php-curl too - Edit apache.conf to get rid of startup message, i.e.
- Add ServerName localhost to apache.conf
Enable user directories in Apache
I set up my beta website in a home directory as it avoid lots of permissions issues. To turn on user directories:- sudo a2enmod userdir
- Enable php in user directories: edit /etc/apache2/mods-enabled/php5.conf
- enable rewrite commands in .htaccess for nice permalinks: sudo a2enmod rewrite
- sudo service apache2 restart
Using a non-standard port
My ISP does not allow servers on port 80 but does permit them on other ports. Based on these instructions I
edit /etc/apache2/ports.conf to read:
Listen 80
Listen 6111
create a new file in /etc/apache2/sites-available with the following content
<VirtualHost *:6111>
ServerAdmin webmaster@localhost
DocumentRoot /home/[name]/public_html
<Directory /home/[name]/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
</VirtualHost>
Listen 6111
ServerAdmin webmaster@localhost
DocumentRoot /home/[name]/public_html
<Directory /home/[name]/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
</VirtualHost>
Listen 6111
- And link this file to the sites-enabled directory
- sudo ln -n sites-available/61112.conf sites-enabled/
Additional steps
- Configure MySQL: (Re-)Create the database user, import the MySQL backup, and reattach privileges.
- Install Ruby via Software Centre
- Install compass (which installs Sass)
- Install sublime sass highlighting package controller
No comments:
Post a Comment