Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Aug 02, 2012 5:36 am 
Offline
Newbie

Joined: Thu Aug 02, 2012 5:25 am
Posts: 2
Hi everyone,

I am not sure whether I have my configurations wrongly. I am using the updated wordpress version.

My website e.g. http://www.mywebsite.com.

I can view mydomain.com but not http://www.mywebsite.com. It will not show page can't be displayed or loads forever.

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

<IfModule mod_rewrite.c>
RewriteEngine On
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]
</IfModule>

In /etc/apache2/sites-available/mywebsite.com (ln -s in sites-enabled)

<VirtualHost *:80>
ServerName mywebsite.com
#ServerAlias *.mywebsite.com (can't work)
#ServerAlias http://www.mywebsite.com (can't work too)
ServerAdmin webmaster@localhost

DocumentRoot /home/myuser/mywebsite.com/public

<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>

<Directory /home/myuser/mywebsite.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

<Directory "/home/myuser/mywebsite.com/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

<Directory "/home/myuser/mywebsite.com/public/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

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

</VirtualHost>

In /etc/apache2/sites-available/default, I didn't modify anything

<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

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/"
<Directory "/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
</Directory>

</VirtualHost>


Top
   
PostPosted: Thu Aug 02, 2012 6:17 am 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
You need:

ServerAlias www.mywebsite.com


Top
   
PostPosted: Thu Aug 02, 2012 6:42 am 
Offline
Newbie

Joined: Thu Aug 02, 2012 5:25 am
Posts: 2
I tried that, makes no differences. Any idea?


Top
   
PostPosted: Thu Aug 02, 2012 8:23 am 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
You did set a DNS record to point www to your IP?

This is my vhost for a domain which works fine:
Code:
<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>


Top
   
PostPosted: Thu Aug 02, 2012 3:25 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
Somethings definitely wrong,

I can't see either mydomain.com or www.mywebsite.com

Are you sure the servers are switched on?

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
PostPosted: Wed Aug 08, 2012 12:08 pm 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
vonskippy wrote:
Somethings definitely wrong,

I can't see either mydomain.com or http://www.mywebsite.com

Are you sure the servers are switched on?


vonskippy's point is POST YOUR REAL DOMAIN NAME. We can help with a lot more troubleshooting that way.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group