I have a simple, Django application which I would like to push to production on a Google Compute Engine (GCE) server. The GCE server is running Debian-Wheezy. I have installed Apache 2, Django 1.6.2 and mod-wsgi on the server and set up a firewall rule which opens port tcp:80.
I am attempting to follow the instructions at https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/modwsgi/. However, I have been unable to find the httpd.conf file to modify.
- Where can I find this httpd.conf file to modify?
- Once found, do I just edit it as shown at the webpage and then any visits to the GCE instance's external IP address will be directed to my Django application?
In my root I have the following folders:
bin boot build dev etc home initrd.img lib lib64 media mnt opt proc root run sbin selinux srv sys tmp usr var vmlinuz
Follwing advice from: http://commanigy.com/blog/2011/06/08/finding-apache-configuration-file-httpd-conf-location I have run the following:
$ ps -ef | grep apache
jason@instance-1:/$ ps -ef | grep apache root 10492 1 0 13:33 ? 00:00:00 /usr/sbin/apache2 -k start www-data 10495 10492 0 13:33 ? 00:00:00 /usr/sbin/apache2 -k start www-data 10496 10492 0 13:33 ? 00:00:00 /usr/sbin/apache2 -k start www-data 10497 10492 0 13:33 ? 00:00:00 /usr/sbin/apache2 -k start jason 11669 11529 0 16:54 pts/1 00:00:00 grep apache
$ /usr/sbin/apache2 -V
Server version: Apache/2.2.22 (Debian) Server built: Feb 1 2014 21:26:17 Server's Module Magic Number: 20---edited-just-in-case Server loaded: APR 1.4.6, APR-Util 1.4.1 Compiled using: APR 1.4.6, APR-Util 1.4.1 Architecture: 64-bit Server MPM: Worker threaded: yes (fixed thread count) forked: yes (variable process count) Server compiled with.... -D APACHE_MPM_DIR="server/mpm/worker" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/etc/apache2" -D SUEXEC_BIN="/usr/lib/apache2/suexec" -D DEFAULT_PIDLOG="/var/run/apache2.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="mime.types" -D SERVER_CONFIG_FILE="apache2.conf"
According to that website the file I'm actually looking for is apache2.conf not httpd.conf - though this contradicts the Django documentation...
To answer @ls97 question, at /usr/sbin/apache2 is a symbolic link which points to
apache2 -> ../lib/apache2/mpm-worker/apache2
If I navigate to this location and run $
ls -al I get
total 496 drwxr-xr-x 2 root root 4096 Apr 18 13:27 . drwxr-xr-x 7 root root 4096 Apr 18 13:27 .. -rwxr-xr-x 1 root root 497808 Feb 1 21:27 apache2
apache2 item at this location is not a directory.