Configure domain name access in XAMPP (Apache) and problems encountered in Linux __linux

Source: Internet
Author: User

XAMPP Apache uses domain name access

First, find/opt/lampp/etc/httpd.conf:

# Virtual hosts
Include etc/extra/httpd-vhosts.conf
Remove the # number in front of the Include etc/extra/http-vhosts.conf (I've removed the above)

Ii. Modification of/opt/lampp/etc/extra/httpd-vhost.conf

<virtualhost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    documentroot/opt/lampp/htdocs/b    (the directory to which the binding is written)
    ServerName www.linuxidc.com                              (write the domain name here)
    Serveralias www.dummy-host.example.com
    ErrorLog logs/ Dummy-host.example.com-error_log
    customlog logs/dummy-host.example.com-access_log Common
 </ Virtualhost>

If my profile is as follows:

<virtualhost *:80>
    documentroot "/opt/lampp/htdocs/"
    ServerName dev.mansys.com
Virtualhost>

Third, modify/etc/hosts, add

127.0.0.1      dev.mansys.com
I have the following:

127.0.0.1       localhost

127.0.0.1       dummy-host.example.com
127.0.0.1
dev.example.com 127.0.0.1       dev.mansys.com

Then visit: dev.mansys.com can

If the following error occurs:

Object not found!


The requested URL is not found to this server. If you are entered the URL manually please check your spelling and try again.


If you would be a server error, please contact the webmaster.
Error 404
Dummy-host.example.com
apache/2.4.23 (Unix) openssl/1.0.2h php/5.5.38 Mod_perl/2.0.8-dev perl/v5.16.3

Modify the/opt/lampp/etc/extra/httpd-vhost.conf, modify my configuration file as follows:

<virtualhost *:80>
    documentroot "/opt/lampp/htdocs/" ServerName dev.mansys.com
    " opt/lampp/htdocs/">
        allowoverride All order
        Deny,allow
        allow to Require all
        granted
    </Directory>
</VirtualHost>


Access again to normal access





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.