Lets break down your error message:
Cannot load /usr/local/apache2/modules /mod_cwmp_22.so into server:
ld.so.1: httpd: fatal: relocation error:
ld.so.1 is the runtime dynamic loader. When you start an app that is dynamically linked (and on Solaris EVERYthing is dynamically linked) the dynamic loader needs to bring in all the libraries. It also needs to ensure not only does it have all the files, but that it links up all the references, both code and data.
file /usr/local/apache2 /modules/mod_cwmp_22.so: symbol curl_easy_init: referenced symbol not found
Now, here we go. The dynamic loader brought in the cwmp module, which depends on curl (libcurl). It seems to have found libcurl.so (or else you would have seen a different error) but it can not find the specific symbol. That is: it knows the cwmp module needs the function call curl_easy_init, but it can not find it.
My guess, is you have a libcurl version mismatch. The webserver module was built against one version of libcurl, but now you're trying to run against a different version on your dev box.
Id check for versions of libcurl. maybe do a
strings -a on libcurl on both dev and prod, make sure they match up. There are other tools like readelf that you can use to verify these, but my big guess is that you can copy the libcurl from prod and place it somewhere in dev where you can see it.
apache2.conf is usually under
/etc/apache2/ and is the apache main configuration file. It loads
httpd.conf which is where you should place your configurations (and not in the main file).
/etc/apache2/apache2.conf file, you certainly have lines like these 2 somewhere:
# Include all the user configurations:
The last one will include
/etc/apache2/httpd.conf file which is probably an empty file (or almost) on a fresh install. If it doesn't exist, you can create a new one and add:
You can add your global configurations and virtualhosts configurations there as stated in the django tutorial. As I know the virtualhost part is not in django tutorial (because it is not django related but apache), here is a starting example from a working django site:
<VirtualHost *:80> # will listen on port 80 - as defined above
ServerName your.site.com # will serve requests on this url
DocumentRoot /path/to/your/djangoproject # like /home/username/projects/myproject
# complete with the rest of the django tutorial configuration under "Serving Files"
# to serve static files using the same server as I think you have only 1 server available
# close the virtualhost after django tutorial configurations
You need to install and enable wsgi module on apache of course. Usually it is already there and you only need to enable it with:
sudo a2enmod wsgi. Not sure about that but I suppose it's enabled for you by GCE based on your configuration for python/django.
Also beware if you are using apache before 2.4, there is a note in django tutorial to change
Require all granted with
Allow from all and select permission order.
I think this is the simplest way to do it. Another method I prefer for multiple virtualhosts, is to use a directory called
sites-available to store 1 file per vhost and enable them selectively linking to
sites-enabled. You can find examples of how to do it in apache documentation but working in
httpd.conf is fine too for a small number of sites.
Apache has to run as root initially in order to bind to port 80. If you don't run it as root initially then you cannot bind to port 80. If you want to bind to some port above 1024 then yes, you can. Otherwise don't worry about root. That is the parent Apache process and does not serve any requests. It will spawn child processes and drop privileges for handling requests.
To change the Apache user set the
Groupparameters in your Apache config.