Created
August 29, 2013 15:22
-
-
Save philpalmieri/6379473 to your computer and use it in GitHub Desktop.
Notes for a new ubuntu box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Install | |
apt-get install apache2 | |
apt-get install php5 libapache2-mod-php5 | |
apt-get install php5-imap | |
apt-get install libssh2-php | |
apt-get install mysql-server | |
apache2-mpm-prefork | |
mysql-client-5.1 | |
mysql-server-5.1 | |
php5 | |
php5-cli | |
php5-mysql | |
php5-mcrypt | |
php5-curl | |
php5-gd | |
// Apache Modules | |
expires.load, headers.load, ssl.load, ssl.conf, rewrite.load | |
//Gen SSL CSR | |
openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr | |
//Hostname | |
httpd.conf Add | |
ServerName localhost | |
//cmdline | |
hostname yoursite.com | |
//Conf File - Add | |
NameVirtualHost 0.0.0.0:80 | |
//Setup SSL httpd.conf | |
<VirtualHost 0.0.0.0:80> | |
ServerName *:80 | |
UseCanonicalName Off | |
DocumentRoot /var/www/com.domain | |
<Directory /var/www/com.domain> | |
Options All +FollowSymLinks | |
Order deny,allow | |
Allow from All | |
AllowOverride All | |
<IfModule sapi_apache2.c> | |
php_admin_flag engine on | |
php_admin_value open_basedir "/var/www/com.domain:/tmp" | |
</IfModule> | |
Options +Includes +ExecCGI | |
</Directory> | |
</VirtualHost> | |
<VirtualHost 0.0.0.0:443> | |
ServerName domain.com | |
ServerAlias www.domain.com | |
UseCanonicalName Off | |
DocumentRoot /var/www/com.domain | |
<Directory /var/www/com.domain> | |
Options All +FollowSymLinks | |
AllowOverride All | |
<IfModule sapi_apache2.c> | |
php_admin_flag engine on | |
php_admin_value open_basedir "/var/www/com.domain:/tmp" | |
</IfModule> | |
Options +Includes +ExecCGI | |
</Directory> | |
SSLEngine on | |
SSLCertificateFile /var/certs/com.domain/com.domain.crt | |
SSLCertificateKeyFile /var/certs/com.domain/com.domain.key | |
SSLCertificateChainFile /var/certs/com.domain/gd_bundle.crt | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment