Last active
December 30, 2015 20:49
-
-
Save lspg/7882950 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| wget -Nnv https://gist.github.com/loispuig/7882950/raw/ecfd68c2f4aa306c123cb0fde16a7e334a88cdd8/wheezy-install-oc-stable.sh && bash wheezy-install-oc-stable.sh; rm -f wheezy-install-oc-stable.sh |
This file contains hidden or 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
| echo 'deb http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/ /' >> /etc/apt/sources.list.d/owncloud.list | |
| wget http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/Release.key | |
| apt-key add - < Release.key | |
| apt-get update | |
| apt-get -y install mysql-server phpmyadmin smbclient php5-curl php5-ldap php-apc owncloud | |
| cat <<EOF > /etc/apache2/sites-available/default | |
| <VirtualHost *:80> | |
| ServerAdmin webmaster@localhost | |
| ServerName oc.example.org | |
| RedirectMatch permanent (/.*) https://oc.example.org$1 | |
| </VirtualHost> | |
| EOF | |
| cat <<EOF > /etc/apache2/sites-available/default-ssl | |
| <IfModule mod_ssl.c> | |
| <VirtualHost _default_:443> | |
| ServerAdmin webmaster@localhost | |
| ServerName oc.example.org | |
| DocumentRoot /var/www/owncloud | |
| <Directory /> | |
| Options FollowSymLinks | |
| AllowOverride None | |
| </Directory> | |
| <Directory /var/www/owncloud/> | |
| Options Indexes FollowSymLinks MultiViews | |
| AllowOverride All | |
| Order allow,deny | |
| allow from all | |
| </Directory> | |
| ErrorLog ${APACHE_LOG_DIR}/owncloud.log | |
| LogLevel warn | |
| CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined | |
| SSLEngine on | |
| SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem | |
| SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key | |
| <FilesMatch "\.(cgi|shtml|phtml|php)$"> | |
| SSLOptions +StdEnvVars | |
| </FilesMatch> | |
| <Directory /usr/lib/cgi-bin> | |
| SSLOptions +StdEnvVars | |
| </Directory> | |
| BrowserMatch "MSIE [2-6]" \ | |
| nokeepalive ssl-unclean-shutdown \ | |
| downgrade-1.0 force-response-1.0 | |
| BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown | |
| </VirtualHost> | |
| </IfModule> | |
| EOF | |
| a2ensite default-ssl | |
| a2enmod ssl rewrite | |
| service apache2 restart | |
| mkdir -p /var/www/owncloud-data | |
| chown -R www-data:www-data /var/www/owncloud-data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment