Browse Source

ee site create wpsubdir basic

old-stable
Mitesh Shah 12 years ago
parent
commit
ea3602fe94
  1. 7
      usr/local/sbin/easyengine
  2. 42
      usr/share/easyengine/nginx/wpsubdir/basic.conf

7
usr/local/sbin/easyengine

@ -683,6 +683,10 @@ FASTCGINGINX()
echo -e "\033[34m W3 Total Cache: http://$DOMAIN/wp-admin/admin.php?page=w3tc_general \e[0m" echo -e "\033[34m W3 Total Cache: http://$DOMAIN/wp-admin/admin.php?page=w3tc_general \e[0m"
} }
# Easy Engine System Settings # Easy Engine System Settings
if [ "$1" = "system" ] if [ "$1" = "system" ]
then then
@ -1238,6 +1242,9 @@ then
# Setup Basic Nginx # Setup Basic Nginx
BASICNGINX BASICNGINX
# Prepare wp-config.php File Foe Wordpress Multisite With SubDirectory
wp core install-network --title="$SITETITLE"
# Display Success Message # Display Success Message
echo echo
echo -e "\033[34m Successfully Created New $3 $4 Website: http://$DOMAIN \e[0m" echo -e "\033[34m Successfully Created New $3 $4 Website: http://$DOMAIN \e[0m"

42
usr/share/easyengine/nginx/wpsubdir/basic.conf

@ -0,0 +1,42 @@
# WPSUBDIR BASIC NGINX CONFIGURATION
server {
# Uncomment The Following Line For Domain Mapping
# listen 80 default_server;
server_name example.com *.example.com;
# Uncomment The Following Line For Domain Mapping
server_name_in_redirect off;
access_log /var/log/nginx/example.com.access.log;
error_log /var/log/nginx/example.com.error.log;
root /var/www/example.com/htdocs;
index index.php index.htm index.html;
if (!-e $request_filename) {
# Redirect wp-admin To wp-admin/
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
# Redirect wp-* Files/Folders
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
# Redirect Other PHP Files
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri /index.php;
include fastcgi_params;
fastcgi_pass php;
}
include /etc/nginx/common/locations.conf;
}
Loading…
Cancel
Save