Website can't be accessed with www.mywebsite.com?
I am not sure whether I have my configurations wrongly. I am using the updated wordpress version.
My website e.g.
I can view mydomain.com but not
I am using Ubuntu 10.04 LTS 64 bits and apache2.
Any help please? Thank you.
My .htaccess as below:-
Note: I tried the commented version, but it didn't work or worst show error 500
RewriteBase /
RewriteCond %{HTTP_HOST} ^mywebsite.com$
RewriteRule ^(.*)$ "http\:\/\/www.mywebsite.com\/$1" [R=301,L]
RewriteCond %{HTTP_HOST} !^www.mywebsite.com [NC]
RewriteRule (.*) http://www.mywebsite.com/$1 [L,R=301]
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
In /etc/apache2/sites-available/mywebsite.com (ln -s in sites-enabled)
ServerAlias *.mywebsite.com (can't work)
ServerAlias http://www.mywebsite.com (can't work too)
ServerAdmin webmaster@localhost
DocumentRoot /home/myuser/mywebsite.com/public
AllowOverride All
AllowOverride All
Order allow,deny
allow from all
AllowOverride All
Order allow,deny
allow from all
AllowOverride All
Order allow,deny
allow from all
ErrorLog /home/myuser/mywebsite.com/logs/error.log
Possible values include: debug, info, notice, warn, error, crit,
alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
In /etc/apache2/sites-available/default, I didn't modify anything
DocumentRoot /var/www
AllowOverride None
AllowOverride None
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
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/"
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
5 Replies
ServerAlias
This is my vhost for a domain which works fine:
<virtualhost *:80="">ServerAdmin admin@nuvini.com
ServerName mydomain.com
ServerAlias www.mydomain.com
# Logs
DocumentRoot /srv/www/mydomain.com/public_html/
ErrorLog /srv/www/mydomain.com/logs/error.log
CustomLog /srv/www/mydomain.com/logs/access.log combined
# phpfpm/fastcgi
<ifmodule mod_fastcgi.c="">AddHandler php5-fcgi .php
Action php5-fcgi /fastcgi/php5.mydomain.external
Alias /fastcgi/php5.mydomain.external /php5.mydomain.external
FastCgiExternalServer /php5.mydomain.external -socket /var/run/apache2/php-fpm-mydomain.sock -appConnTimeout 30 -idle-timeout 60
<location fastcgi="" php5.mydomain.external="">Order Deny,Allow
Deny from All
Allow from env=REDIRECT_STATUS</location></ifmodule>
# Enable Rewrite
RewriteEngine On
<directory "="" srv="" www="" mydomain.com="" public_html"="">AllowOverride All</directory></virtualhost>
I can't see either mydomain.com or
Are you sure the servers are switched on?