• Home
  • About Us
  • Services
    • SEO Services
    • Website Design Service
  • Projects
  • Docs
  • Blog
    • Affiliate
    • Ecommerce
    • Frontend
    • linux
      • nginx
    • PHP
      • Magento
      • wordpress
    • Python
    • SEO
    • Web
  • Contact Us

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

Hearing aid listed company official website SEO case

2023-05-23

how to use docker to run php5.6 plus apache

2023-05-15

Running the Apache HTTP Server with PHP inside Docker

2023-05-15
Facebook Twitter Instagram
  • 中文
  • English
Facebook Twitter Instagram Pinterest VKontakte
SEO & Website build tips SEO & Website build tips
  • Home
  • About Us
  • Services
    • SEO Services
    • Website Design Service
  • Projects
  • Docs
  • Blog
    • Affiliate
    • Ecommerce
    • Frontend
    • linux
      • nginx
    • PHP
      • Magento
      • wordpress
    • Python
    • SEO
    • Web
  • Contact Us
SEO & Website build tips SEO & Website build tips
Home»nginx»how to config multi domain wordpress with nginx
nginx

how to config multi domain wordpress with nginx

OxfordBy Oxford2019-11-30No Comments1 Min Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email
#vi /etc/nginx/conf.d/wordpress-multi.conf

server {
listen *:80;
listen [::]:80;
server_name 9wp.net yourwebsite.com;
return 301 http://www.$host$request_uri;
}


server {

listen *:80;
listen [::]:80;
server_name www.9wp.net www.yourwebsite.com;

root /var/www/vhosts/$host;
index index.html index.htm index.php;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}

location ~* \.(js|css|png|jpg|jpeg|gif|svg|ico|woff|woff2)$ {
expires 30d;
add_header Cache-Control "public, no-transform";
}

location ~* \.(pdf|css|html|js|swf)$ {
expires 2d;
}

location ~* .(eot|ttf|woff|svg|otf)$
{
add_header Access-Control-Allow-Origin *;
}

}


 

you can setup unlimited website in just on nging config file, that will save your time.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Avatar photo
Oxford

Related Posts

Add custom field to Woocommerce tab

2022-03-07

Surror Product Tabs for WooCommerce

2022-03-07

make wordpress static with gatsby

2021-09-29

WP Remote Users Sync – manage multi wordpress website easy

2021-08-01
Recent Posts
  • Hearing aid listed company official website SEO case
  • how to use docker to run php5.6 plus apache
  • Running the Apache HTTP Server with PHP inside Docker
  • VideoJS – multiple source demo
  • Add custom field to Woocommerce tab
November 2019
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  
« Oct   Dec »
Tags
app branding design digital Docly docs etc faq fix github Helpdesk Image issue magento Manual marketing memecached Photography planing seo sequrity tips Travel ui/ux web WordPress 爬虫
Editors Picks
About Us

Guangzhou Weilai Technology is a foreign trade integrated marketing service provider focusing on Google as the drainage center and marketing self-built website as the carrier.

Email Us: [email protected]
Contact: +86 18676917505

Facebook Pinterest YouTube LinkedIn
Recent Posts
  • Hearing aid listed company official website SEO case
  • how to use docker to run php5.6 plus apache
  • Running the Apache HTTP Server with PHP inside Docker
  • VideoJS – multiple source demo
  • Add custom field to Woocommerce tab
From Flickr
Website Design Case
© 2023 Copyright by Guangzhou Weilai Technology Co.,Ltd..
  • Home
  • About Us
  • SEO Services
  • Website Design Service
  • Projects
  • Blog
  • Contact Us

Type above and press Enter to search. Press Esc to cancel.