Home  >  Article  >  Backend Development  >  Installing lubuntu/ubuntu on SSD optimizes tmpfs, causing apache2/nginx to fail to start.

Installing lubuntu/ubuntu on SSD optimizes tmpfs, causing apache2/nginx to fail to start.

WBOY
WBOYOriginal
2016-07-30 13:30:191009browse

During SSD solid state drive optimization, /var/log was put into the ramdisk of tmpfs. Restarting caused the apache2 and nginx directories in /var/log to be lost, and apache2/nginx failed to start.

Solution: Create these two directories in ~/.bashrc and add them at the end of ~/.bashrc. (Oh, use the discovery method to add ~/.bashrc. After the second time you open the terminal, you will be prompted to create a directory error. It is better to add /etc/rc.local)

Tips-> Correction: Add the /etc/rc.local file before exit 0.

#for apache2

mkdir /var/log/apache2

#for nginx

mkdir /var/log/nginx

Restart the machine

Copyright statement: This article is an original article by the blogger and has not been authorized by the blogger. No reproduction allowed.

The above introduces the problem of installing lubuntu/ubuntu on SSD to optimize tmpfs, causing apache2/nginx to fail to start, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn