Apache problem - 2 domains

Asked

Viewed 53 times

1

good afternoon...

I’m trying to set up 2 domains on 1 server: _Debian Linux _Apache2

I created the following file: pclinx.conf , then applied a2ensite , enabled and restarted apache2.

<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.pclinx.com.br
ServerAlias *.pclinx.com.br
DocumentRoot /var/www/html/pclinx


<Directory />
   Options FollowSymLinks Indexes
   AllowOverride AuthConfig
</Directory>
<Directory /var/www/html/pclinx>
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
   Order allow,deny
   Allow from all
</Directory>
</VirtualHost>

In /var/www/html/pclinx you have an index.html file .... but I can’t see the index anymore.

Website: www.pclinx.com.br

Can you help me please?

2 answers

0

You can try it like this, on Virtualhost put the Server IP, access the Apache2 log that is in the /var/log/, to see what error occurs.

<VirtualHost IP_DO_SERVIDOR:80>
ServerAdmin webmaster@localhost
ServerName www.pclinx.com.br
ServerAlias *.pclinx.com.br
DocumentRoot /var/www/html/pclinx


<Directory />
   Options FollowSymLinks Indexes
   AllowOverride AuthConfig
</Directory>
<Directory /var/www/html/pclinx>
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
   Order allow,deny
   Allow from all
</Directory>
</VirtualHost>

If you need a Hosting manager use Ispconfig3, script to install on Ubuntu: https://gist.github.com/jniltinho/4b50de4a24a162add15f

0

I just set up here to simulate your problem. I did it this way:

<VirtualHost *:80>
    DocumentRoot /var/www/html/pclinx/
    DirectoryIndex index.html index.php
    ServerName www.pclinx.com.br
        <Directory /var/www/html/pclinx/>
        Options Indexes FollowSymLinks MultiView
        AllowOverride all
        Order allow,deny
        allow from all
        </Directory>
</VirtualHost>

I suggest you delete what you tried and put this instead. If you can’t make it work, post here the last lines of your apache log.

Don’t forget to restart apache after changing.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.