www. mysite.com works, mysite.com doesn´t
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
If i enter
Thanks for any help.
- Maybe is a .htacces thing….
21 Replies
If I had to guess (without seeing what the actual config files look like), I'd say that ServerName and ServerAlias in the config file corresponding to your domain name only has one of these.
I see
ServerName mysite.com
ServerAlias www.mysite.com
Is that what you were guessing?
Thanks Neon
You might consider adjusting ServerAlias
Ensure you have a DNS entry setup for mysite.com.
Remember to reload Apache when you're done.
@Mercer:
Grevan,
You might consider adjusting ServerAlias
www.mysite.com to show ServerAliaswww.mysite.com mysite.comEnsure you have a DNS entry setup for mysite.com.
Remember to reload Apache when you're done.
You don't need to put the domain into ServerAlias when it's already in ServerName. And there is a DNS entry for mysite.com, since it does display a website (although from a different directory).
On that note, Grevan, please ensure that mysite.com is pointing to the same IP address as
000-default
mysite.com
mysite2.com
mysite3.com
Neon, how do i ensure that mysite.com is pointing to the same IP address as
mysite.com mail is handled by 10 mail.mysite.com
What does the 000-default file look like? Is there a reference to your domain name in any ServerName or ServerAlias directives there?
And going back to the original mysite.com file; please do double-check the spelling of your domain name in both ServerName and ServerAlias, just to be sure.
>
DocumentRoot /var/www
Options FollowSymLinks AllowOverride None
Options Indexes FollowSymLinks MultiViews AllowOverride None
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
ErrorLog /var/log/apache2/error.log
Possible values include: debug, info, notice, warn, error, crit,
alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
Options Indexes MultiViews FollowSymLinks AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
There are no ServerName or ServerAlias there.
2- I double checked the names and their are fine
Do i have to go to a certain directory to call it?
Also, keep in mind that the parameter for the apachectl is an uppercase S (not lowercase).
I tried apache2ctl status, look what gives me:
****/usr/sbin/apache2ctl: 134: www-browser: not found
'www-browser -dump
Maybe you need to install a package providing www-browser or you
need to adjust the APACHE_LYNX variable in /etc/apache2/envvars****
- Just a note, my other sites can be accessed with www or without, only this one, which is also my FQDN domain and i only access with www.
/usr/sbin/apache2ctl -S
prefix with
sudo
if you're running as a normal user.
make sure you're using an upper case S.
It shows the list of my sites enabled.
I don´t see anything wrong there.
in /etc/hostname and /etc/hosts it´s mysite.com there.