apache2.4 , where to setup mod_ssl, dont see any mod_ssl.so file - apache

Problem is the plain vanila apache is working, the moment I say sslEngine ON
it gives error, I am not able to find where any ssl setup is?
it does not create any log as well..
How this ssl setup is done? will copying a mod_ssl.so file from outside will work?
Apache version : 2.4.29
Os is RHEL 6.7

If this Red Hat documentation is not wrong the RHEL 6.x releases include Apache/2.2. Since you have Apache/2.4 I'd say you probably have an unofficial binary. Such binaries could of course have been installed in any conceivable way so this answer can easily be wrong. Yet making the hopefully safe assumption that you're still using the package manager and you just switched to a third-party repository you can try this:
yum install mod_ssl
Then tweak /etc/httpd/conf.d/ssl.conf to your liking and restart the service:
service httpd graceful

After a lot of research, I found below command which can help you show the actual issue while restarting. when I ran this it told me that .csr which I was using were wrong. I could not get this when I normally started the Apache but this command helped.
replace below with location where apache is installed and conf file is located, this will print the error ( if any).
/xxx/app/xxx/apache22/0/bin/apachectl_worker -DSSL -k start -f /xxx/app/xxx/apache22/0/conf/xxx.conf

Related

Create local debian repository

My goal is to demonstrate creating a local debian repository with controlled versions of tools used (e.g. compiler versions) to make a build system more predictable.
I've tried to follow this example: http://linuxconfig.org/easy-way-to-create-a-debian-package-and-local-package-repository
but when I get to the apt-get update stage, I always get a 404 not found on the repository I've added.
The apache2 server is running, I can view the default page installed at http://localhost/html/index.html.
I am trying this with the file fortune-mod_1%3a1.99.1-7_amd64.deb installed to /var/www/debs. I create the Packages.gz file as the tutorial suggests:
dpkg-scanpackages debs /dev/null | gzip -9c > debs/Packages.gz
I also add a new file: /etc/apt/sources.list.d/myppa.list with this line:
deb http://localhost debs/
I restart the apache2 service just in case:
sudo service apache2 restart
but running:
sudo apt-get update
still produces this error:
W: Failed to fetch http://localhost/debs/Packages 404 Not Found
Is there something basic I'm missing? Ultimately, I'd like to get this working over a LAN, but first have to get it working on a single machine.
EDIT: I'm doing this on Ubuntu 14.04.
EDIT: Show contents of file /etc/apt/sources.list.d/myppa.list
tldr; use aptly
It's the easiest apt repository management tool I've found and it comes with neat tutorial showing how to create, populate, and publish your own apt repository.
References:
https://www.aptly.info/
https://www.aptly.info/tutorial/repo/
I ended up solving the problem. It was an issue with the default document root being different for the tutorial than on my system. All I did was move my debs folder to html (document root turns out to be /var/www/html, not just /var/www on my install). That did the trick.

Clear apache log or change log while apache is running

I want to clear my Apache log without stopping apache or anything like that, but I have a problem while apache's running I can not edit the active log file.
I attempted some solutions but all is not good, or it just does not work - for example:
cat /dev/null > /path/to/log.log
It works but it kills the CPU.
Now I want to know has anybody got a good solution for clearing log files or creating a new log file with a new name every N hours which doesn't kill the CPU,RAM,etc ...
What can I do? Please give me a solution :((
Kind regards.
Install and set up logrotate, assuming you are on a debian or ubuntu distribution do this :
$ sudu apt-get install logrotate
This is an "industry standard" solution for what you want to achieve.
Recommended reading:
http://articles.slicehost.com/2010/6/30/understanding-logrotate-on-ubuntu-part-1
http://articles.slicehost.com/2010/6/30/understanding-logrotate-on-centos-part-1
https://unix.stackexchange.com/questions/66292/learning-about-general-logging-logrotation-on-linux

httpd.config error when insntalling mod_wsgi+django

its been more than 2 weeks. i try to instal but still getting error.
firstly, indeed I have searched similar error but i didn't find solution at all. if you find it. please let me know.
second, this is my state :
1. i have installed python 2.7 and django 1.5.1 (it works).
2. i also install MAMP.
3. i try to configure mod_wsgi and want it integrated with my MAMP apache server.
4. using mac mountain lion 10.8.4
my configuration file :
/etc/apache2/original/extra/httpd-userdir.conf inside my apache2/original/extra/
/etc/apache2/users/akhyar.conf pastebin.com/zcY58WTV (sorry about this Iam new on stack overflow)
/etc/apache2/httpd.conf pastebin.com/je2D8zMz
third, this is my error :
when i run apachectl configtest this error appears my error
so, what is going on actually? can someone tell me why and show me the mistakes?
if its been solved, what is the next step for configuring mod_wsgi on my MAMP?
thanks before, any help are highly appreciated.
In this file, line 15, you're including the per-user conf files:
http://pastebin.com/7y7ibuqP
On line 473 of this one, one of those per-user conf files, you're including the above file again:
http://pastebin.com/zcY58WTV
This causes infinite recursion while trying to parse the conf files.
I think there are some other errors too, and to be honest the files are pretty messy, but the best way forward is to remove all Include directives from akhyar.conf. For the most part they're already duplicates, where they're not, inline the contents of those files instead of using Include. If there are other errors, you'll at least see useful line numbers to start tracking them down.
Also note that the [warn] lines are just warnings - which you should probably fix, but the server will still run without them, that's not what's causing the error.

Phusion Passenger ngnix.conf location

I have a Rails 3 application that uses Phusion Passenger. I install the standalone version of Passenger using the command "gem install passenger" on my Macintosh MacBook Pro. The application works fine. Now, I want to change some configurations for the ngnix server but I can not find the location of the ngnix.conf file. I have looked in /usr/local and /opt/ and /etc/. Can someone assist me in either finding or creating the ngnix.conf?
Thanks
Look for the nginx.conf file in /opt/nginx/conf
You must have su privileges to edit this file.
Remember to stop and start nginx after making your changes

how to get trac to run with apache?

i have some problems getting trac to be running with apache.
have no idea of how to do and the tutorial i followed doesnt work.
http://trac.edgewall.org/wiki/TracModPython
i have an empty /etc/apache2/httpd.conf. should it be empty?
then i followed the tutorial and typed in:
LoadModule python_module modules/mod_python.so
so now it contains one row. i have ubuntu and i installed mod_python with:
apt-get install libapache2-mod-python libapache2-mod-python-doc
however, when i run a2enmod mod_python it says:
ERROR: Module mod_python does not exist!
but i have checked that it exists in /usr/lib/apache2/modules/mod_python.so.
so whats the problem?
Usually, installing mod_python via:
apt-get install libapache2-mod-python
will enable it. If it does not, the correct command is:
a2enmod python
note, the module is 'python', not 'mod_python'.
First, your httpd.conf may be empty, but you should also have a apache2.conf in the same directory that actually contains all the server directives.
As for the module, I was having the same issue and then did some digging. If you look in /etc/apache2/mods-enabled, you should have one in there called "python.load" (I do at least). If you open that up with vi, you will notice the following line in that file:
LoadModule python_module /usr/lib/apache2/modules/mod_python.so
I think that it may just be that its installed with a different name. If someone else knows different, I would be interested in hearing their views as well.
Regards,
Jeff