Question

Apache Configuration - DNS

Hello, sorry to bother you all. I hope you guys can help me out on this one. So when I type in www.transportesantamaria.com.mx it goes directly to the page but when dropping off the www and just like http://transportesantamaria.com.mx It takes me to the folder directory. I have no .htaccess configured and my DNS configuration looks like this:

$TTL	1800
@		IN	SOA	NS1.DIGITALOCEAN.COM.	hostmaster.transportesantamaria.com.mx. (
			1413392660 ; last update: 2014-10-15 17:04:20 UTC
			3600 ; refresh
			900 ; retry
			1209600 ; expire
			1800 ; ttl
			)
             IN      NS      NS1.DIGITALOCEAN.COM.
                     NS      NS2.DIGITALOCEAN.COM.
                     NS      NS3.DIGITALOCEAN.COM.
			MX 1	ASPMX.L.GOOGLE.COM.
			MX 5	ALT1.ASPMX.L.GOOGLE.COM.
			MX 5	ALT2.ASPMX.L.GOOGLE.COM.
			MX 10	ASPMX2.GOOGLEMAIL.COM.
			MX 10	ASPMX3.GOOGLEMAIL.COM.
@	IN A	104.131.0.155
www	CNAME	@
*	CNAME	@

Also here is the .conf file

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port th                                                                             at
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.

        ServerName transportesantamaria.com.mx
        ServerAlias www.transportesantamaria.com.mx
        ServerAdmin servicios@transportesantamaria.com.mx
        DocumentRoot /var/www/transportesantamaria.com.mx/public_html
.....

Thanks in advance

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

run this:

service apache2 restart # Ubuntu/Debian

or

service httpd restart #CentOS/Fedora/RHEL

If it is still broken, paste the output of this command in here so we can see what’s going on:

apache2ctl -S #Ubuntu/Debian

or

httpd -S #CentOS/Fedora/RHEL