Jump to content

Hi all i have been configuring test environment for WordPress Multi Site on Ubuntu 16.04 with NGINX and MariaDB.

After going through the installer WordPress is asking me to add the config (See Bellow) to my .htaccess i tried creating a file .htaccess in /var/www/html/ and placing the following into it how ever that doesnt seem to have worked meaning i cannot goto any sub sites created.

Thanks in Advance to Any Assistance.

 

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

 

Link to comment
https://linustechtips.com/topic/797853-nginx-wordpress-multi-site-setup/
Share on other sites

Link to post
Share on other sites

Does nginx support htaccess? That's typically an apache thing. This article indicates that you need to convert the config for the rewrite https://www.nginx.com/blog/converting-apache-to-nginx-rewrite-rules/

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | Asus RTX 4060 Dual OC | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO + 4 Additional Venturi 120mm Fans | 8 x 20TB Seagate Exos X22 | 4 x 16TB Seagate Exos X18 | 3 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Spoiler

NAS: Innovision 4U 24-bay chassis (12GB MiniHD SGIO Backplane) | Intel Core i9-10980xe | EVGA X299 FTW-K | EVGA RTX 2080Ti Super FTW3 | 128GB (8x16GB) Corsair Vengeance LPX 3200Mhz | DEEPCOOL PN1000M PSU| Noctua NH-D12L Chromax Black | 16 x 16TB Seagate Exos X18 | 2 x 2TB Samsung 990 Pro | 2 x 2TB Intel U.2 P4510 | LSI 9305-24i HBA

 

Link to post
Share on other sites

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | Asus RTX 4060 Dual OC | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO + 4 Additional Venturi 120mm Fans | 8 x 20TB Seagate Exos X22 | 4 x 16TB Seagate Exos X18 | 3 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Spoiler

NAS: Innovision 4U 24-bay chassis (12GB MiniHD SGIO Backplane) | Intel Core i9-10980xe | EVGA X299 FTW-K | EVGA RTX 2080Ti Super FTW3 | 128GB (8x16GB) Corsair Vengeance LPX 3200Mhz | DEEPCOOL PN1000M PSU| Noctua NH-D12L Chromax Black | 16 x 16TB Seagate Exos X18 | 2 x 2TB Samsung 990 Pro | 2 x 2TB Intel U.2 P4510 | LSI 9305-24i HBA

 

Link to post
Share on other sites

@gibbsy81 Have you considered using a pre existing development environment like VVV

 

If you don't want to go that route heres what we include in all site configs generated by the VVV project.

https://github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/config/nginx-config/nginx-wp-common.conf

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×