#20140714-01 :: lgcodechallenger :: apache 2.4.7 + django 1.5.8 on ubuntu 14.04 LTS with AWS
$ sudo su
# apt-get update
# vi ~/.bashrc
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
: wq
# source ~/.bashrc
# apt-get -y upgrade
# wget https://www.djangoproject.com/download/1.5.8/tarball/ --default-page=Django-1.5.8.tar.gz
# tar -vxzf Django-1.5.8.tar.gz
# cd Django-1.5.8
# sudo python setup.py install
# python -c "import django; print(django.get_version())"
# apt-get install -y apache2
# apache2 -version
# sudo aptitude install -y libapache2-mod-wsgi
# a2enmod wsgi
# sudo apt-get install -y git-core python2.7-mysqldb
# mkdir /srv/django
# cd /srv/django
# git clone https://github.com/ghilbut/lgcodechallenger.git
# cd lgcodechallenger/lgcc
# cp settings.py.example settings.py
# vi settings.py
== do something ==
# vi /etc/apache2/sites-available/001-lgcc.conf
<VirtualHost *:80>
ServerAdmin support@lgcodechallenger.com
ServerName lgecodejam.com
ServerAlias design.lgcodechallenger.com dev.lgcodechallenger.com
DocumentRoot /var/www/html
Alias /static/admin /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin/
Alias /static /srv/django/lgcodechallenger/lgcc_media/static/
<Directory /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin>
Require all granted
</Directory>
<Directory /srv/django/lgcodechallenger/lgcc_media/static>
Require all granted
</Directory>
WSGIDaemonProcess lgcodechallenger.com user=ubuntu group=ubuntu processes=1 threads=10 python-path=/srv/django/lgcodechallenger:/usr/local/lib/python2.7/site-packages
WSGIProcessGroup lgcodechallenger.com
WSGIScriptAlias / /srv/django/lgcodechallenger/lgcc/wsgi.py
<Directory /srv/django/lgcodechallenger/lgcc>
Order allow,deny
Allow from all
<Files wsgi.py>
Require all granted
</Files>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
:wq
# a2dissite 000-default.conf
# a2ensite 001-lgcc.conf
# apachectl configtest
# service apache2 restart
'working diary' 카테고리의 다른 글
#20150115-01 :: Ubuntu 12.04 :: (1) 사용자 이름 및 그룹 변경하기 (0) | 2015.01.15 |
---|---|
#20140714-02 :: lgcodechallenger :: vsftpd 3.0.2 on ubuntu 14.04 LTS with AWS (0) | 2014.07.14 |
#20140626-01 :: aptana3 :: Google App Engine directory on Aptana Studio 3 (0) | 2014.06.26 |
#20140418-01 :: Apache :: (13)Permission denied (0) | 2014.04.18 |
#20140403-01 :: Maven :: Java version reset problem (0) | 2014.04.03 |