mod_wsgi-express: error: Invalid command was specified - apache

I am trying to run wsgi application (hello.wsgi) on localhost through apache24 with mod_wsgi module but it shows this:
cd c:/apache24/bin
mod_wsgi-express start-server hello.wsgi
Usage: mod_wsgi-express command [params]
Commands:
module-config
module-location
mod_wsgi-express: error: Invalid command was specified.
Please help me!

On Windows the start-server command is not available. Using pip install mod_wsgi on Windows is only for getting the mod_wsgi module compiled. Once you have it compiled, run:
mod_wsgi-express module-config
Copy the output from that into your Apache configuration file to have it load the mod_wsgi module. Then configure Apache manually to host your specific WSGI application.
See section "Connecting into Apache installation" in:
https://pypi.python.org/pypi/mod_wsgi
for more details about the module-config command.

Related

Gentoo install mod_proxy_balancer

I installed in Apache in Gentoo and i need to use it like a proxy but i am unable to install mod_proxy_balancer. If i restart apache it display the following:
apache2 has detected an error in your setup: AH00526: Syntax error
on line 4 of /etc/apache2/vhosts.d/jira.conf: Invalid command
'ProxyRequests', perhaps misspelled or defined by a module not
included in the server configuration * ERROR: apache2 failed to stop
Any suggestion how to?
May seems a easy question for Gentoo expert, but not for beginners.
Please create a new file if not existing:
nano /etc/portage/package.use/apache2
Add the line containing the following:
www-servers/apache apache2_modules_proxy_balancer apache2_modules_slotmem_shm apache2_modules_proxy slotmem_shm mod_proxy_balancer mod_proxy apache2_modules_lbmethod_byrequests apache2_modules_proxy_balancer apache2_modules_slotmem_shm apache2_modules_proxy apache2_modules_proxy_ajp apache2_modules_proxy_balancer apache2_modules_proxy_http
Please run the following command in order to update the packages:
emerge -avDU #world
The purpose of this file is to add the following modules when apache2 ( www-servers/apache ) will be installed with the following command:
emerge www-servers/apache
After apache is installed with the requested modules need to add ( -D PROXY )
nano /etc/conf.d/apache2
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PROXY "
Now we should be ok with the apache modules.

nginx ldap module error

I was trying to include the LDAP module to nginx. I could add the module and make install nginx successfully, however, while trying to restart the nginx, I get the following error:
sudo /usr/local/nginx/sbin/nginx -c /var/www/conf/nginx.conf -t
nginx: [emerg] dlopen() "/usr/local/nginx/modules/ngx_http_auth_ldap_module.so" failed (/usr/local/nginx/modules/ngx_http_auth_ldap_module.so: undefined symbol: ngx_ssl_handshake) in /var/www/conf/nginx.conf:11
nginx: configuration file /var/www/conf/nginx.conf test failed
When I looked at the ngx_http_auth_ldap_module.c file, I found that there is a call to this function. I am not sure where is this function being called from. Is there any other library that needs to be installed?
I have already installed the following:
openssl-devel.x86_64
openldap-devel.x86_64
zlib-devel.x86_64
I figured it out that I wasn't configuring nginx with the http_ssl_module option.
To make it work, I re-configured the nginx as:
./configure --add-module=/path/to/ldap_module --with-http_ssl_module
And then issued make and install commands. The ngx_ssl_handshake error got removed.

Unable to start Apache server [apache-2.2.29]

I have installed Apache as root and provisioned port 7773 in my httpd.conf file.
When I try to start apachectl then I get the error below:
[root#iam-dev bin]# ./apachectl -k start
httpd: Syntax error on line 420 of /home/app/apache-2.2.29/conf/httpd.conf: Syntax error on line 9 of /home/app/apache-2.2.29/conf/webgate.conf: Cannot load /home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib/webgate.so into server: /home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib/webgate.so: undefined symbol: nzos_GetSSLSessionID
You need to set LD_LIBRARY_PATH env variable to point /home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib and the Apache Home lib dir. Like,
export LD_LIBRARY_PATH=/home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib:<Apache Instal Dir>/lib
Also, you can find out the libs that are not getting resolved using following command.
ldd home/app/Middleware/Apache22_WebgateR2PS2_Home/webgate/apache/lib/webgate.so
HTH,
Anil

installing mod_headers on Linux, apache 2.2.21

Trying to install the mod_headers to be able to append a HTTP header with the Header directive. But the installation process doesn't show the header module as being installed.
Did the following steps. Switched over to the httpd installation and under the modules/metadata directory did:
apxs -c mod_headers.c
the so file is created under the metadata/.libs directory (not sure why). Added the module with:
apxs -i -a -n mod_headers ./metadata/.libs/mod_headers.so
Restarted apache and tried a dump of the modules but getting:
httpd: Syntax error on line 54 of /www/fkwiki/apache/conf/httpd.conf: Can't locate API module structure `mod_headers' in file /www/fkwiki/apache/modules/mod_headers.so: /www/fkwiki/apache/modules/mod_headers.so: undefined symbol: mod_headers
Got a warning in the installation of the module (i.e. apxs -i ....):
Warning! dlname not found in /www/fkwiki/apache/modules/mod_headers.so
Anybody else have the same problem?

Activemq will not start on my Ubuntu VM

I'm trying to run activemq on my ubuntu virtual machine but have constantly been running into issues getting it to start up. I've tried downloading the binary and source with no luck. Currently I have downloaded the source, run "mvn clean install -Dmaven.test.skip=true" and mvn reported successful installation. I then hunted around in my .m2 folder found apache-activemq-5.5.1-bin.tar.gz and extracted it to my home/USERNAME dir and attempted to run "bash bin/activemq start" only to receive the following error.
INFO: Loading '/etc/default/activemq'
INFO: Using java '/usr/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties
and log4j.properties
to get details
bin/activemq: line 370: /usr/bin/java -Xms256M -Xmx256M -Dorg.apache.activemq.UseDedicatedTaskRunner=true
-Djava.util.logging.config.file=logging.properties
-Dcom.sun.management.jmxremote
-Dactivemq.classpath="/home/jacob/activeMq1/apache-activemq-5.5.1/conf;"
-Dactivemq.home="/home/jacob/activeMq1/apache-activemq-5.5.1"
-Dactivemq.base="/home/jacob/activeMq1/apache-activemq-5.5.1"
-jar "/home/jacob/activeMq1/apache-activemq-5.5.1/bin/run.jar" start >/dev/null 2>&1 &
RET="$?"; APID="$!";
echo $APID > /home/jacob/activeMq1/apache-activemq-5.5.1/data/activemq.pid;
echo "INFO: pidfile created : '/home/jacob/activeMq1/apache-activemq-5.5.1/data/activemq.pid' (pid '$APID')";
exit $RET: No such file or directory
Has any one run into this type of error before?
Looks like I'm answering one of my questions again, but maybe this will help someone in the future.
steps.
I ended up getting activemq to work by creating a configuration file via running the command "./bin/activemq setup newConfig" (exclude the quotes)
I then replaced the current config file "activemq" which was located at etc/default/. (I made a backup of the original activemq file before overwriting it with newConfig).
Run "./bin/activemq start" which will create a PID file.
After the file is created re-run "./bin/activemq start" to finally start up the broker.
You can then test the install by navigating to "http://localhost:8161/admin/" or by doing a "netstat -an | grep 61616" if you kept the default ports etc.
I install activemq 5.13 on Debian, download and unzip in /opt, then I go to /opt/apache-activemq-5.13.1/run "./bin/activemq start", then appear this error:
xx#debian:/opt/apache-activemq-5.13.1$ ./bin/activemq start
INFO: Loading '/etc/default/activemq'
INFO: Using java '/usr/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
./bin/activemq: 330: ./bin/activemq: "/usr/bin/java" -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/opt/apache-activemq-5.13.1//conf/login.config -Djava.awt.headless=true -Djava.io.tmpdir="/opt/apache-activemq-5.13.1//tmp" -Dactivemq.classpath="/opt/apache-activemq-5.13.1//conf:/opt/apache-activemq-5.13.1//../lib/:" -Dactivemq.home="/opt/apache-activemq-5.13.1/" -Dactivemq.base="/opt/apache-activemq-5.13.1/" -Dactivemq.conf="/opt/apache-activemq-5.13.1//conf" -Dactivemq.data="/opt/apache-activemq-5.13.1//data" -jar "/opt/apache-activemq-5.13.1//bin/activemq.jar" start >/dev/null 2>&1 &
RET="$?"; APID="$!";
echo $APID > /opt/apache-activemq-5.13.1//data/activemq.pid;
echo "INFO: pidfile created : '/opt/apache-activemq-5.13.1//data/activemq.pid' (pid '$APID')";exit $RET: not found
What I did is to check the Debian version using "uname -a":
Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux
I found my debian is 64 bit system. so I run
./bin/linux-x86-64/activemq start
It shows:
Starting ActiveMQ Broker...
Then I can access the site:http://localhost:8161/admin/ with username "admin" and password "admin"
with Ubuntu 14.04, I had to create a link in /etc/activemq/instances-enabled
sudo ln -s ../instances-available/main/
similar to apache2 setup
then started the server with /etc/init.d/activemq start
sudo is necessary.
bin$ sudo ./activemq start
bin$ sudo ./activemq status
INFO: Loading '/opt/runtime/apache-activemq-5.11.1/bin/env' INFO: Using java '/usr/bin/java' ActiveMQ is running (pid '29887')