我只是想知道在编辑 fstab 和 mtab 后是否需要重新启动我的服务器。由于 awstats 报告的问题,我手动更改了此文件中的某些内容。
我使用ISPConfig 3本教程的帮助howtoforge。但是由于移除/删除了某些帐户,fstab 和 mtab 的配置混乱了。
我也在 howtoforge 论坛上问过这个问题,但直到现在还没有人回答。如果您想阅读我的问题,请访问这里。
我非常努力地解决了这个问题,但没有运气。
更新:
这是我的 fstab 发生的情况:
在值之前(我省略了另一个):
/var/log/ispconfig/httpd/mydomain.com /var/www/clients/client1/web1/log none bind,nobootwait 0 0
/var/log/ispconfig/httpd/example.com /var/www/clients/client1/web2/log none bind,nobootwait 0 0
Run Code Online (Sandbox Code Playgroud)
所以我把它改成了正确的路径:
/var/log/ispconfig/httpd/mydomain.com /var/www/clients/client1/web2/log none bind,nobootwait 0 0
/var/log/ispconfig/httpd/example.com /var/www/clients/client1/web3/log none bind,nobootwait 0 0
Run Code Online (Sandbox Code Playgroud)
我还发现 mtab 具有与上述相同的值,这就是我手动编辑它的原因。
从:
/var/log/ispconfig/httpd/mydomain.com /var/www/clients/client1/web1/log none rw,bind 0 0
/var/log/ispconfig/httpd/example.com /var/www/clients/client1/web2/log none rw,bind 0 0
Run Code Online (Sandbox Code Playgroud)
到:
/var/log/ispconfig/httpd/mydomain.com /var/www/clients/client1/web2/log none rw,bind 0 0
/var/log/ispconfig/httpd/example.com /var/www/clients/client1/web3/log none rw,bind 0 0
Run Code Online (Sandbox Code Playgroud)
我编辑了这些值,因为 …
我不知道以下日志是否与我的网站有时关闭有关。我的服务器上有很多网站,但它们没有任何类似以下的日志:
117.169.1.85 - - [03/Jan/2015:23:21:37 +0800] "GET /announce.php?info_hash=%D0%A2M%CE%13%21H%D4%11%0C%8C%27%22%C83%B4%A3l%92%15&peer_id=%2DSD0100%2D%C50%95xmh%9B%13%7C%D42%F7&ip=39.178.24.33&port=14940&uploaded=3893629&downloaded=3893629&left=1369695469&numwant=200&key=1490&compact=1 HTTP/1.1" 404 162 "-" "Bittorrent"
115.231.228.252 - - [03/Jan/2015:23:21:37 +0800] "GET /announce.php?info_hash=%DE%82%BC%CFBmH%29e%FD%25%ED6b%F2%2DX%EE%BE%21&peer_id=%2DSD0100%2D%BF3%DAG%83%1F%DAGnV%E3%C8&ip=118.134.134.210&port=13567&uploaded=675282944&downloaded=675282944&left=80740352&numwant=200&key=7916&compact=1 HTTP/1.0" 404 162 "-" "Bittorrent"
115.231.228.252 - - [03/Jan/2015:23:21:37 +0800] "GET /announce?info_hash=%DE%82%BC%CFBmH%29e%FD%25%ED6b%F2%2DX%EE%BE%21&peer_id=%2DSD0100%2D%BF3%DAG%83%1F%DAGnV%E3%C8&ip=118.134.134.210&port=13567&uploaded=675282944&downloaded=675282944&left=80740352&numwant=200&key=16205&compact=1 HTTP/1.0" 404 20283 "-" "Bittorrent"
123.123.126.154 - - [03/Jan/2015:23:21:37 +0800] "GET /announce.php?info_hash=%AA%21U%8F%7F%BA%DC%8F%D2%A5%B5A%7B%26t%F7%2A%FF%1E%8C&peer_id=%2DSD0100%2D%91%11%E7%11G%7B%8C%EB%14Y%2B%26&ip=123.123.126.154&port=12070&uploaded=129742857&downloaded=129742857&left=85310&numwant=200&key=11590&compact=1 HTTP/1.0" 404 162 "-" "Bittorrent"
114.86.129.8 - - [03/Jan/2015:23:21:37 +0800] "GET /announce.php?info_hash=%9A%90s%DCK%29%93%05%FE%BA%E6%D3%7D%03%12%25l%B0%B8k&peer_id=%2DSD0100%2D%20%80%3FRw%E5%0E%3D%3F%2F%B1%0F&ip=114.86.129.8&port=17767&uploaded=240822656&downloaded=240822656&left=480772096&numwant=200&key=5792&compact=1 HTTP/1.0" 404 162 "-" "Bittorrent"
222.161.198.228 - - [03/Jan/2015:23:21:38 +0800] "GET /announce.php?info_hash=f%F7x%23%A6w%96%955%E6T%09%3Br%DD%A5%F3%3D%A4%05&peer_id=%2DSD0100%2Dp%83%F6%00%E9%04B4%28%E5%F4%F8&ip=192.168.1.102&port=11274&uploaded=444858368&downloaded=444858368&left=181403648&numwant=200&key=17766&compact=1 HTTP/1.0" 404 162 "-" "Bittorrent"
117.140.8.11 - - [03/Jan/2015:23:21:38 +0800] "GET /announce?info_hash=%C7Jr%2F%E4%DF9%ECk%BA%88%94%7B%FF%8Ad%102%FA%5B&peer_id=%2DSD0100%2D%F6%F1%A1%A6%C9%01%DC%17%DC%AA%5D%19&ip=19.34.33.71&port=16456&uploaded=60373348&downloaded=60373348&left=1712431046&numwant=200&key=31414&compact=1 …Run Code Online (Sandbox Code Playgroud) 我有两台服务器,分别是 Ubuntu 12.04 和 Ubuntu 14.04。当我在新服务器中使用 Ubuntu 14.04 并启用 /etc/php5/fpm/php-fpm.conf 下的 php-fpm 日志文件时,其内容如下:
error_log = /var/log/php5-fpm.log
Run Code Online (Sandbox Code Playgroud)
我注意到我在 Ubuntu 12.04 中找到的大部分日志都不是用 14.04 写的。例如,如果我在 Ubuntu 12.04 中重新启动 php5-fpm,则会写入重新启动日志,但是,在 14.04 中不会发生这种情况。我在 14.04 中错过的另一个日志如下:
[23-Aug-2014 16:23:03] NOTICE: [pool web42] child 118098 exited with code 0 after 12983.480191 seconds from start
[23-Aug-2014 16:23:03] NOTICE: [pool web42] child 147653 started
[23-Aug-2014 17:27:31] WARNING: [pool web8] child 76743, script '/var/www/mysite.com/web/wp-comments-post.php' (request: "POST /wp-comments-post.php") executing too slow (12.923022 sec), logging
Run Code Online (Sandbox Code Playgroud)
我真的很想拥有这种日志,以便我知道慢速脚本执行的时间长度。
有谁知道除了 /etc/php5/fpm/php-fpm.conf 之外,Ubuntu 14.04 中是否还有其他设置需要更改?
更新:
这是我运行时的结果 …
linux ×2
ubuntu-14.04 ×2
awstats ×1
fstab ×1
log-files ×1
logging ×1
nginx ×1
php-fpm ×1
ubuntu-12.04 ×1