NethServer Version: 7.9.2009
Module: WEB server
Hi,
I’m just looking for alternative for CRM Vtiger7. Good alternative for me looks EspoCRM. I have created new virtualhost for it. But when I want run installer it write me this error:
**You need to configure your webserver in order to being able to run EspoCRM. After that refresh the page.**
## For Apache webserver
You need to have **mod_rewrite** enabled. You can do it by running in the terminal:
```
sudo a2enmod rewrite
sudo service apache2 restart
```
### Non-production environment
You need to enable `.htaccess` usage in the apache configuration. Add the code:
```
<Directory /var/lib/nethserver/vhost/abb4d5a01422c31>
AllowOverride All
</Directory>
```
### Production environment
It's recommended to configure the document root to look at the `public` directory and create an alias for the `client` directory. The code to add to the apache configuration:
```
DocumentRoot /var/lib/nethserver/vhost/abb4d5a01422c31/public/
Alias /client/ /var/lib/nethserver/vhost/abb4d5a01422c31/client/
```
And allow override for the `public` directory:
```
<Directory /var/lib/nethserver/vhost/abb4d5a01422c31/public/>
AllowOverride All
</Directory>
```
But I thing my config for virtualhost is right with AllowOveride All.
/etc/httpd/conf.d/virtualhosts.conf:
<VirtualHost *:443>
DocumentRoot "/var/lib/nethserver/vhost/abb4d5a01422c31"
ServerName podpora.serer.sk
# Handle request with additional PHP-FPM backend from SCLo/Remi repositories
<FilesMatch .php$>
SetHandler "proxy:unix:/var/run/rh-php73-php-fpm/abb4d5a01422c31-php73.sock|fcgi://localhost"
</FilesMatch>
# 20forcessl_redirect enabled
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{SERVER_NAME}$1 [R,L]
#
# 20ssl_engine
#
SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/podpora.server.sk/cert.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/podpora.server.sk/privkey.pem"
SSLCertificateChainFile "/etc/letsencrypt/live/podpora.server.sk/chain.pem"
# 30directory -- basic directory setup
<Directory /var/lib/nethserver/vhost/abb4d5a01422c31>
AllowOverride All
Options FollowSymLinks
Options +Indexes
Options +Includes
php_admin_value upload_max_filesize 4M
php_admin_value post_max_size 8M
php_admin_value max_execution_time 0
php_admin_value max_input_time 0
php_admin_value max_file_uploads 20
<RequireAll>
# access public
Require all granted
# authentication disabled
</RequireAll>
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/lib/nethserver/vhost/abb4d5a01422c31"
ServerName podpora.server.sk
# Handle request with additional PHP-FPM backend from SCLo/Remi repositories
<FilesMatch .php$>
SetHandler "proxy:unix:/var/run/rh-php73-php-fpm/abb4d5a01422c31-php73.sock|fcgi://localhost"
</FilesMatch>
# 20forcessl_redirect enabled
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{SERVER_NAME}$1 [R,L]
# 30directory -- basic directory setup
<Directory /var/lib/nethserver/vhost/abb4d5a01422c31>
AllowOverride All
Options FollowSymLinks
Options +Indexes
Options +Includes
php_admin_value upload_max_filesize 4M
php_admin_value post_max_size 8M
php_admin_value max_execution_time 0
php_admin_value max_input_time 0
php_admin_value max_file_uploads 20
<RequireAll>
# access public
Require all granted
# authentication disabled
</RequireAll>
</Directory>
</VirtualHost>
Thanks for help.