0

My client site is: xyz.com.br

I have created a demo.xyz.com.br (DNS Record A) pointing to the ip address of my server.

The request is reaching my server.

The problem:

How do I setup Virtual Host on appache to hit the root directory of the 2nd level domain, if the domain is not hosted on my server?

The target folder: demo.xyz.com.br -> Document Root /home/xyz/public_html/public

Error:

You don't have permission to access / on this server.

Apache doe's not resolve de domain name like a normal domain!!

1 Answer 1

1

If you've got the A-record set up and the request is reaching your server, then all you need is to set up Apache. Assuming that:

Error: You don't have permission to access / on this server

is being returned by your server (and it should give you the address in the footer) then you probably just need to add a Location clause to your VirtualHost:

<VirtualHost *:80>
    ServerName demo.xyz.com.br
    # ... other directives ...

    # Add this bit:
    <Location />
        Order allow,deny
        Allow from all
    </Location>

</VirtualHost>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .