0
I am trying to redirect a domain and a CNAME to an IP at Locaweb.
It is a cloud server that generates a temporary link to access the site from the browser. Let’s assume: http://cproXXXX.publiccloud.com.br
In domain hosting I’m putting like this:
dominio.com.br A XXX.X.XXX.XXX
www.dominio.com.br CNAME dominio.com.br
This IP is from the Locaweb server that is the site. I configured the Virtual Host like this:
ServerName dominio.com.br
ServerAlias www.dominio.com.br
ServerAdmin [email protected]
DocumentRoot /var/www/dominio.com.br/public_html
<Directory /var/www/dominio.com.br/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
I’ve circled the a2ensite dominio.com.br.conf
And nothing happens.
When access the site appears like this:
You can only access this site by the address: http://cproXXXX.publiccloud.com.br
Then he redirects to that domain and enters the site I left as a test.
But how do I access the domain and already land on the site ?
Apache2 Log - Error.Log
[Wed May 18 13:47:52.720700 2016] [mpm_prefork:notice] [pid 8080] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.16 configured -- resuming normal operations
[Wed May 18 13:47:52.720907 2016] [core:notice] [pid 8080] AH00094: Command line: '/usr/sbin/apache2'
What appears in the apache log? After a2ensite restarted the service (without being Reload?)
– Rafael Mena Barreto
I restarted Apache2 with Restart...
– Diego Souza
what you did I do daily in my Ocaweb VPS, the business is to activate the log and see what message it gives
– Rafael Mena Barreto
Which folder is this LOG ? Apache log or Server log ? What is the path ?
– Diego Souza
The vhost log itself, Errorlog ${APACHE_LOG_DIR}/domain.com.br-error.log Customlog ${APACHE_LOG_DIR}/domain.com.br-access.log Combined
– Rafael Mena Barreto
ah, and a2ensite is domain.com.br (the has to have . conf in the file, but not in the command)
– Rafael Mena Barreto
In LOG the only things you have are the ones I put in my POST
– Diego Souza
That’s why I asked to activate the vhost log but take a look at my comment on a2ensite
– Rafael Mena Barreto
I saw your comment, I had already done it. And the Logs are enabled
– Diego Souza
witchcraft. Ran apachectl configtest to see if all confs are ok? Other than that my next attempt was to take your site from /var/www
– Rafael Mena Barreto
I typed this command there, appeared Syntax OK
– Diego Souza
remove the site from /var/www give permission to www-data:www-data and, I don’t know, check if the DNS is replicating even
– Rafael Mena Barreto
You don’t even have that www-data folder
– Diego Souza
is not a folder, is a user and a group.
– Rafael Mena Barreto
Got it. Well, there’s no it here. I installed Apache2, PHP, Mysql everything from 0...
– Diego Souza
I’m having the same problem and nothing, I think it might be the hosts file, it has this entry:127.0.1.1 {namepads}.publiccloud.com.br {namepads}
– Rangel R. Morais