好久没有更新网站了

主要还是犯懒。重新捡起来吧,当个笔记本也不错。 近期把服务器系统更新了一下,从Ubuntu 18更新到了20,PHP从7.2更新到7.4,nginx更新到了1.22.0 。 遇到了一些问题,靠着log和bing一一解决。 如果看官也想干这个事,记得要把网站的nginx conf文件更新一下,upstream中的sock名字和位置改了。

nginx下建立WordPress站点的小总结

1、PHP配置 disable_functions = show_source,phpinfo,passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority

PHP 5.3以上版本为每个虚拟主机设置open_basedir的办法

前面文章里提过open_basedir来保平安,但那个是写在一句里的,对整个服务器而言的设置。 PHP5.3支持对每个虚拟主机设置不同的open_basedir。感觉安全性又高了一层。 这样搞: vim /etc/php5/fpm/php.ini 你机子上的php.ini可能不在这个位置,反正改php.ini就对了。 找到open_basedir这一条,改成下面这种格式: [HOST=www.aaa.com] open_basedir=/usr/share/nginx/html/aaacom/:/tmp/:/proc/ [HOST=/home/www/www.bbb.com] open_basedir=/usr/share/nginx/html/bbbcom:/tmp/:/proc/ 当然,如果你的机器只跑一个网站那也就没必要了。

折腾VPS笔记:Debian+LNMP的配置 (安装)

DPMag.net之前用VPS默认提供的CentOS 6.5+LAMP来搭建,一直稳定运行,加上本站访问量实在有限,似乎也扯不到什么安全性的问题。 但是宅男不折腾折腾是会手痒的。在另一台VPS上,我正在玩一些新潮的东西。系统弄到了Debian 8.0,Apache换成了nginx,MySQL Server也换成了MariaDB,整个是一套非典型LNMP。 LNMP好说,选Debian很多人会嘲笑我。但我有我的理由

CentOS 6.6 + LAMP实战 (三)

6 PHP安全加固 现在你的VPS网站可以跑了,但是访问多了,安全性就得重视起来,我们从apache php mysql三个方面分别加固。 vim /etc/php.ini 打开PHP配置文件,进行一些修改。 先看386行,这一行指定PHP禁用的函数。PHP的功能很强大,但功能强大就意味着安全隐患多。我们跑一般的网站,也用不着这些功能。像下面这样修改:

CentOS 6.6 + LAMP实战 (二)

4、MySQL配置 # service mysqld start <–启动mysql server MySQL安装以后,默认的配置文件my.cnf是没有什么用的。我们需要从/usr/share/mysql/里面复制一个出来代替它。 # cp /usr/share/mysql/my-medium.cnf /etc/my.cnf 在/usr/share/mysql/有5个预设的配置文件。分别适用于各种规模的数据库。在配置文件中,分别指明了适用于多大系统内存的服务器使用。具体来说是这样的:

CentOS 6.6 + LAMP实战 (一)

最近弄了个VPS,基本上没有什么后台可用,纯用SSH登录来管理。之前虽然操作过Linux,但是终究不是实际架站,这一趟的VPS之战着实费了一番工夫。现而今墙越来越高,VPS价格又一路走低,想必VPS会成为更多个人站长的选择。把架站过程整理出来希望对各位有所帮助。 1、连接到VPS 首先进入VM后台,获取几个信息:IP地址、SSH端口、root密码。 有的VPS管理系统可能还提供证书等以保证安全登录,跟着他们的指导做就行,目的就是登录上SSH。 软件工具方面,推荐XShell,对个人用户免费,功能上比putty强大。 填写IP、端口即可,我为了安全起见没有保存用户名和密码,如果对Xshell足够放心也可以保存。