Last active
August 29, 2015 14:11
-
-
Save adrienkaiser/79a458fce48f8f63d87f 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
Start CYGWIN | |
## Connect to AWS server from Cygwin | |
[CYGWIN] $ ssh -i ~/WinHome/Work/AE/Corexpert/cxp_frankfurt_dmaas.pem [email protected] | |
## Setup web server on AWS EC2 server | |
# https://www.digitalocean.com/community/tutorials/how-to-configure-the-apache-web-server-on-an-ubuntu-or-debian-vps | |
$ sudo aptitude update | |
$ sudo aptitude upgrade | |
$ sudo aptitude install apache2 | |
# will install http, php.... and start web server apache2 | |
+ open port 80 in AWS EC2 dashboard | |
(http://54.93.191.8 will show Apache default page) | |
## Setup public html folder | |
# http://httpd.apache.org/docs/2.2/howto/public_html.html | |
# http://stackoverflow.com/questions/5891802/how-do-i-change-the-root-directory-of-an-apache-server | |
# http://stackoverflow.com/questions/10873295/error-message-forbidden-you-dont-have-permission-to-access-on-this-server | |
$ mkdir ~/public_html | |
$ chmod -R 755 ~/public_html # 755 == a+rx, u+w | |
($ sudo chmod u+w /etc/apache2/sites-available/000-default.conf) | |
$ sudo vi /etc/apache2/sites-available/000-default.conf | |
> DocumentRoot /home/ubuntu/public_html | |
> # Set access permission | |
> <Directory /> | |
> Require all granted | |
> <Directory> | |
$ sudo service apache2 restart | |
## Install PHP and allow URL include | |
$ sudo apt-get install php5 | |
$ sudo vi /etc/php5/apache2/php.ini | |
/allow_url | |
allow_url_include = On | |
:wq | |
$ sudo service apache2 restart | |
## Authorize cgi (to execute python) on web server | |
# http://fr.wikibooks.org/wiki/Apache/CGI | |
# http://webpython.codepoint.net/cgi_tutorial | |
$ sudo vi /etc/apache2/sites-available/000-default.conf | |
> ScriptAlias /cgi-bin/ "/home/ubuntu/public_html/" | |
> <Directory "/home/ubuntu/public_html/"> | |
> AllowOverride None | |
> AddHandler cgi-script .py | |
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch | |
> Require all granted | |
> <Directory> | |
$ sudo a2enmod cgi # enable cgi # http://askubuntu.com/questions/403067/cgi-bin-not-working | |
$ sudo service apache2 restart | |
+ .htaccess file in Document Root with "AddHandler cgi-script .py" and "Options +ExecCGI" | |
## Install Gedit | |
$ sudo aptitude install gedit | |
## Allow output to be shown as soon as available (and not buffered) | |
$ sudo a2dismod deflate | |
$ sudo service apache2 restart | |
## Copy DMaaS files on server | |
[CYGWIN] $ scp -i ~/WinHome/Work/AE/Corexpert/cxp_frankfurt_dmaas.pem -r ~/WinHome/Work/AE/Corexpert/CODE_DMAAS [email protected]:/home/ubuntu/public_html | |
## Call from web browser | |
http://54.93.191.8/dmaas/COREXPERT | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment