Find DB Version
When your running your own lamp on vps having a cheatsheet like this for Apache may come in handy. Especially when the rubber hits the road.
Stop your web server
1
| sudo systemctl stop apache2
|
Start the web server when it is stopped, type:
1
| sudo systemctl start apache2
|
Stop and then start the service again, type:
1
| sudo systemctl restart apache2
|
Reload without dropping connections.
1
| sudo systemctl reload apache2
|
Re-enable the service to start up at boot, type:
1
| sudo systemctl enable apache2
|
1
| sudo a2ensite your_domain.conf
|
Disable the default site defined in 000-default.conf:
1
| sudo a2dissite 000-default.conf
|
Test for configuration errors:
1
| sudo apache2ctl configtest
|
REBOOT reboot a server from the command line, run:
1
| sudo systemctl disable apache2
|
Query the state of apache processes
1
| sudo systemctl status apache2.service -l --no-pager
|
Check apache for config errors
1
| sudo apachectl configtest
|
Search apache error log
This will only search 2 lines
1
| sudo tail -n 2 /var/log/apache2/error.log
|
View apache error log
1
| vim /var/log/apache2/error.log
|
Comments powered by Disqus.