apachectl/httpd: recover config file that's currently running? - apache

Apache is running but I lost my httpd.config file, because I did something a little careless.
Is there any way to dump the settings of a running Apache instance?

If you do not have backup of httpd.conf file then you can recover delete file using testdisk utility. Please refer to below link.
Recover deleted file in Linux

Related

How to set Rabbitmq.config on Windows OS

I am using Rabbitmq server 3.9.13 on windows.
When I runs Rabbitmq server, it saids
This timeout value can be configured, see consumers doc guide to learn more
So I am going to edit the config file but I can not find where the file is located.
Is there someone know it?
I found the config file path using the following command.
rabbitmq-diagnostics.bat status
The file was located in 'C:/Users/Your User/AppData/Roaming/RabbitMQ/advance.config'

Where does dump.rdb belong?

I remember playing around with some settings and I believe it changed the location of dump.rdb. Now, dump.rdb auto-magically appears at the root of my projects.
Where does it belong, and how would I return it there? Also, how does this location change when in a production environment?
Where does it belong?
Wherever you want.
The default directory is ./, meaning the directory where the Redis server got started from.
Edit:
* I am modifying your second question (asked in comment) a little bit.
Is it possible to change to location of dump.rdb? How?
Yes, it is possible. There two possible ways I can think of.
1.
Modify redis configuration file (e.g. redis.conf) and restart redis server. This way, every restart after this one will use the new directory. But redis will not reload any previous data at first restart (because there will not be anything to reload from).
To reload previous data, previous dump.rdb would have to be moved to new location manually before restarting the server.
2.
Set new directory by CONFIG SET command. E.g.
CONFIG SET dir path/to/new/directory
* Note that the path has to be a directory.
That's it! But this way is not permanent because server restart will use the old directory.
To make new directory permanent, execute CONFIG REWRITE to rewrite the configuration file. Remember, redis server has to have write permission to that file.
dir path/to/dorectory has to be set in the redis config file.

WAMP Server 3.0.0 cannot open apache conf file

I've re-installed WAMP in order to put it into a different directory. This was mainly so everything is automatically backed up.
Mysql starts ok, but apache fails with the following message from the event viewer:
The Apache service named reported the following error:
httpd.exe: Could not open configuration file bin/conf/httpd.conf: The system cannot find the path specified. .
This file is in the correct place (C:\googledrive\wamp64\bin\apache\apache2.4.17\conf) and there isn't any other stray httpd.conf files that it might be picking up on the path or anywhere.
Any ideas?
This turned out to be a permissions problem. It seems that the system account didn't have access to the directory containing the config file, but I guess must have had enough access to start up Apache and give that helpful (not) message!

OpenERP - modifying database port setting and saving the configuration file

I want to change database port from 5432 to 5433, for OpenERP Server. When I try to edit openerp-server.conf file or config.py file, they cannot be saved, error said the file is opened by another program. I stopped openerp-server service but still cannot save the file. I am using OpenERP v6.
My question is am I looking to the right files to change database listening port? If yes how I can save the edited files? Thanks in advance for your help.
The correct file for openerp-server setting is openerp-server.conf.
I have copied file to desktop then managed to delete the file at original location. Changed the desktop version of file and then copied back. It worked.

Migrating Apache to another machine

I am using apache version 2.0.16 on opensolaris machine.I have one application running on it.Now I want to copy all the configurations files from this to another machine which has the same configuration as the first machine.
For this I would need to copy the httpd.conf file.Are there any other files or configurations I need to copy or write.
Thanks in advance.
Usually http.conf includes other files. You should open it and check for includes.
Some common includes:
extra/http-*.conf
sites-available/*