I have a question about apache configuration. Please help me!
My server run multi virtual hosts (multi domains). But, every time I edit a vhost file, I have to restart apache, and, server have to reload all configuration files. That is expensive. Is there any way to "restart" or "reload" just one vhost configuration file? I googled but haven't found the solution.
I'm not 100% sure, but I think the answer is "No". I've been looking for this for a while, too. Although, you say "restart apache", what command are you running? Are you using the apache restart or reload command? You should only have to use reload.
Related
I was trying to get the Apache server to work. When I was done with it I uninstalled the service and deleted all the server files. However I noticed even after all that going to localhost address shows me this page
How do I go on about removing this page from my localhost? Thanks
To expand on the previous comment ... after killing all httpd processes (and this may be a problem because Apache will respawn children) ... then reboot the system to see if the problem persists.
If it does persist, then Apache has not been uninstalled and it'll have to be uninstalled. If the system uses sysvinit, look in /etc/init.d for a script that starts Apache and disable that script.
If the problem does not persist then Apache was properly uninstalled and the problem will not recur.
Hi so basically what I am trying to do is get my spring web-application to run on port 80. I have installed tomcat8 and apache on a Ubuntu server and everything is running smoothly on myDomainName.com:8080, I have tried installing Authbind to help but it says I must set AUTHBIND=yes in the file location /etc/default/tomcat but for some reason this file is not present.
I have read previously that this file is not created if the installation was done from extracting the target file, this was my approach and this seems to me why the file is not there, I have no other solution.
Is there another way to set this authbind to yes or will I have to use Ip tables, or forward requests from Apache to tomcat. if i cant set authbind what in your opinion is the best solution.
Sorry if I left anything out, any help/suggestions would be of great help.
Thanks!
I would just completely reinstall the Tomcat on to your system. I had a similar problem and this was the only solution for me.
I am having the most frustrating time trying to edit my httpd.conf file for Apache server. I've done it numerous times on other machines, but on this one, it says it's always in use. I've killed the Apache service and the Apache monitor process.
Does anyone know what else would use this file? Let me know of any other info you need.
you can try the commands fuser or lsof to see/kill the process that uses the file. see this link for some examples (scroll down a bit): http://www.lunarforums.com/vps_hosting_at_lunarpages/useful_linux_scripts_lsof_ps_fuser_netstat-t41474.0.html
I have an application with some cacheing backend and I want to clear the cacheing whenever the webserver is been restarted.
Is there a apache configuration directive or any other way to execute a shell script upon webserver (re)start?
Thanks,
Phil
Adding some more information, as asked by some answers already:
Base system is ofc linux based, in this exact situation: CentOs
Modifying the startup script is unfortunately no option as pointed out by one of the comments already, due to it beeing not configuration file within the respective RPM packages and therefor beeing replaced by updates. Also I think modifying the startup script would be a bad thing in general
I see, that actually linking both "restarting the webserver" and "clearing my app cache" is not exactly what should be tied together. I will consider other alternatives
My situation is as follows: I can define how the virtual host config looks like, but I can not define how the rest of the servers configuration looks like.
The application is actually PHP based (and runs on the symfony framework). Symfony pre-compiles alot of stuff into dynamic php files from what it finds in the static configuration files. We deploy our apps via RPM and after deployment, an webserver restart is actually initiated already, so I thought it might make sense to tie the cache-cleanup to it. But I think after getting all your feedback, it looks like it is better to put the cache cleanup process into the installation process itself.
You haven't provided a lot of detail here, so it's hard to give a concrete answer, but I would suggest that your best option is to write a script which handles restarting apache, and clearing your cache. It would look something like this:
#!/bin/sh
# restart apache
/etc/init.d/httpd graceful
# whatever needs to be done to clear cache
rm -rf /my/cache/dir
Ramy suggests modifying the system startup script for Apache -- this is a bad idea! If and when you update Apache on your server, there is a good chance that your change will be lost.
Dirk suggests that what you are trying to do is probably misguided, and I think he's right. You haven't told us what platform you are running, but I can think of few situations where restarting your webserver and clearing a cache actually need to happen together.
You can modify Startup script for the Apache Web Server in /etc/init.d/httpd and write your own syntax inside it.
chattr +i /etc/init.d/httpd
If you have (root) access to the server you could do this by shell scripts but I would consider if it is the best way of cache management to rely on apache restarts.
Yes - Google abounds with information about configuring Apache to support SSI.
But unfortunately, I still cannot seem to get it right.
My questions:
Can anyone furnish me a full-fledged example config file that enables SSI on an Apache server?
Also can you please tell me where I should drop this config file (i.e. which
directory)?
Apache probably wouldn't run if you didn't already have a fully-fledged config file. Try an
apachectl configtest
and see what happens.
My site is hosted at 110mb.com.
Interestingly enough, here is the solution:
Rename all files which have server-side includes to *.shtml.