Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
添加typecho伪静态
Browse files Browse the repository at this point in the history
  • Loading branch information
xzhih committed Jan 22, 2018
1 parent 72c655c commit 0968172
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion onmp_intall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## @Author: triton
# @Date: 2017-07-29 06:10:54
# @Last Modified by: triton2
# @Last Modified time: 2018-01-18 17:17:27
# @Last Modified time: 2018-01-22 16:18:27

# 软件包列表
pkglist="wget unzip grep sed tar ca-certificates php7 php7-cgi php7-cli php7-fastcgi php7-fpm php7-mod-calendar php7-mod-ctype php7-mod-curl php7-mod-dom php7-mod-exif php7-mod-fileinfo php7-mod-ftp php7-mod-gd php7-mod-gettext php7-mod-gmp php7-mod-hash php7-mod-iconv php7-mod-intl php7-mod-json php7-mod-ldap php7-mod-session php7-mod-mbstring php7-mod-mcrypt php7-mod-mysqli php7-mod-opcache php7-mod-openssl php7-mod-pdo php7-mod-pcntl php7-mod-pdo-mysql php7-mod-phar php7-mod-session php7-mod-shmop php7-mod-simplexml php7-mod-soap php7-mod-sockets php7-mod-sqlite3 php7-mod-sysvmsg php7-mod-sysvsem php7-mod-sysvshm php7-mod-tokenizer php7-mod-xml php7-mod-xmlreader php7-mod-xmlwriter php7-mod-zip php7-pecl-dio php7-pecl-http php7-pecl-libevent php7-pecl-propro php7-pecl-raphf nginx-extras zoneinfo-core zoneinfo-asia libmariadb mariadb-server mariadb-client mariadb-client-extra"
Expand Down Expand Up @@ -306,6 +306,13 @@ location / {
rewrite /wp-admin$ $scheme:https://$host$uri/ permanent;
OOO

# typecho
cat > "/opt/etc/nginx/conf/typecho.conf" <<-\OOO
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}
OOO

}

############## 重置、初始化MySQL #############
Expand Down Expand Up @@ -932,6 +939,7 @@ install_typecho()
# 添加到虚拟主机
add_vhost $port $webdir
sed -e "s/.*\#php-fpm.*/ include \/opt\/etc\/nginx\/conf\/php-fpm.conf\;/g" -i /opt/etc/nginx/vhost/$webdir.conf # 添加php-fpm支持
sed -e "s/.*\#otherconf.*/ include \/opt\/etc\/nginx\/conf\/typecho.conf\;/g" -i /opt/etc/nginx/vhost/$webdir.conf
onmp restart >/dev/null 2>&1
echo "$name安装完成"
echo "浏览器地址栏输入:$localhost:$port 即可访问"
Expand Down

0 comments on commit 0968172

Please sign in to comment.