How do you restart Apache?
Stack How?
Stackorigin – The Community of Question and Answers Latest Articles
Read More About Python List Comprehension with examples
Python List Comprehension: Python List comprehension provides a much more short syntax for creating a new list based on the values of an existing list. Advantages of List Comprehension in Python: Time Efficient than loop Space Efficient than loop Needs ...
Do not accept an offer letter from companies.
Do not accept an offer letter from companies without verifying the following points. Designation Salary Details & CTC Distribution Leave Policies Working Hours & Days Medical Coverage/Insurance Probation Period Notice Period Benefits and Perks Bonus F&F Policy
How to call API using Ajax
AJAX stands for Asynchronous JavaScript and XML and its used for to make calls to the server to fetch some data. In this article, we will learn how to implement a simple API call using AJAX technology. How to use GET ...
Ubuntu way:
to restart apche server:
Sudo service apache2 restart
for the way that’s borrowed from Red Hat.Do you want to restart Apache, or do you want to gracefully reload its configuration?
Everyone was answering the first question; you can do the second with
Gracefully reloading is a bit faster, and there’s no downtime.
There’s one caveat: if your apache config files contain an error (e.g. configures a log file in a directory that doesn’t exist), the server may silently exit without printing any error messages to the console. Most other errors are caught by the
apache2ctl configtest
thatservice apache2 reload
runs before doing the actual reload withapache2ctl graceful
.The recommended way under Ubuntu to start/stop services (not just Apache) is to use the start/stop/reload commands (which really are symbolic links to the initctl program, part of upstart).
For services that use the legacy
/etc/init.d
scripts, the corresponding script will be called with the correct parameters; for services that use the upstart infrastructure, the appropriate event transition will be signaled to the upstart daemon via initctl.So, to start/stop/reload/restart apache on Ubuntu, you can use: