W
W
WhiteBachelor2018-11-30 21:57:42
Apache HTTP Server
WhiteBachelor, 2018-11-30 21:57:42

Why does the local server redirect from the virtual host to the stub?

Hello. The problem is this: I installed xampp, uncommented the permission to virtual hosts in the /opt/lampp/etc/httpd.conf file, made a www folder in the home directory (htdocs has too high rights) and in it, in fact, my site. Next edited etc/hosts:

127.0.0.1       localhost  
127.0.0.1       my_site.com
127.0.1.1       my_name

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Then /opt/lampp/etc/extra/httpd-vhosts.conf:
NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
        ServerAdmin [email protected]
        DocumentRoot "/opt/lampp/htdocs"
        ServerName localhost
</VirtualHost>

<VirtualHost 127.0.0.1:80>
        DocumentRoot "/home/king/www/my_site.com"
        ServerName my_site.com
        ServerAlias www.my_site.com
        ErrorLog "/logs/my_site-error_log"
        CustomLog "logs/my_site-access_log" common
        <Directory />
        AllowOverride All
        Require all dranted
        <Directory />
</VirtualHost>

I write in the search for my_site.com. A stub opens from the /opt/lampp/htdocs folder: I did it
5c0187c645a19800782732.png
according to the instructions from here.
What's the matter?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Ruslan Fedoseev, 2018-11-30
@martin74ua

The domain name must consist only of letters, numbers and a hyphen "-". The total number of characters in a domain name must not exceed 63 characters.
as an option

0
0ffff0, 2018-12-01
@0ffff0

As far as I understand nothing about this because of this: .com
as they write on mintmem.com/page/xampp-for-linux-part2

Avoid matching the suffix with real-life domain zones, check, for example, here .

W
WhiteBachelor, 2018-12-01
@WhiteBachelor

Problem solved: removed ErrorLog and CustomLog lines. maybe someone will come in handy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question