Htaccess virtualhost

NethServer Version: NethServer release 7.6.1810
Module: Web Server

Hi, i have installed web server module with php support.
I have create some vhost with différent CMS or application.

On one vhost i have manually install wordpress ( not with nethserver-wordpress )
I have some problem with the .htaccess. If i create it, i have the default page of nethserver.
If i delete it, wordpress vhost is ok.

I found this post on the forum but i have Internal Server Error if i apply this solution.

Thank’s for your help

Hi Elberton,

In the vhost do not activate FTP, WordPress has its own FTP.

In .htaccess

# ************************************** 
# Permalinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# **************************************
# To protect wp-config
<Files wp-config.php>
 order allow,deny
 deny from all
</Files>

# **************************************
# To protect htaccess
<Files .htaccess>
 order allow,deny
 deny from all
</Files>

# **************************************
# Directives for Apache
#
# To follow links
Options +FollowSymLinks

# Hide folder without index.???
Options -Indexes

You can have a look at: https://www.micronator.org/affaires/produit/nethserver-101-cahier-06nethserver-wordpress/
It is in French but you can follow images and commands.

Michel-André

1 Like

Hi MichelAndré.
Thank’s for you help.
that Ok. i have desactivate FTP for the vhost and Apply your htaccess.

I have only a problem with a plugin wpfastest cache. I don’t have the law to modify the folder cache.