To solve this problem we have to do the following. Keep in mind that using the same ip address can have a http web server and also a http file server using virtual hosts.
So in slackware lets say that our web server is under /var/www/htdocs/forum folder and our http file server under /var/www/htdocs/pub folder.
I suppose that in /etc/httpd/httpd.conf file have un-comment the lines
LoadModule vhost_alias_module lib64/httpd/modules/mod_vhost_alias.so
Include /etc/httpd/extra/httpd-vhosts.conf
1. We create a .htaccess file in /var/www/htdocs/pub/ folder where we put the following lines in it.
Code: Select all
IndexOptions +Charset=UTF-8
Options +Indexes +Includes +FollowSymLinks +MultiViews
“AllowOverride” allows you to override some Apache settings.
Code: Select all
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
ServerName ariadni.noip.me
DocumentRoot "/var/www/htdocs/forum"
<Directory "/var/www/htdocs/forum/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName slackel.ddns.net
DocumentRoot "/var/www/htdocs/pub"
<Directory "/var/www/htdocs/pub/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
Code: Select all
sudo service restart httpd
Code: Select all
sudo sh /etc/rc.d/rc.httpd restart
http://slackel.ddns.net/LOGO_linux/logo ... ΗΝΙΚΑ-8.x/ the file server with Greek named files.