Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 28th February 2010, 17:19
umano umano is offline
Junior Member
 
Join Date: Mar 2009
Posts: 21
Thanks: 1
Thanked 0 Times in 0 Posts
Default domain.com and www.domain.com point to different folder - DNS configured

I did the usual (perfect server lenny) setup, but when try to reach my websites with www I see the standard index.html of ispconfig.

I set for every domain an A record www that points to the Ip of the website.
Also I set a subdomain A record and and a new website into ispconfig, but when i try to reach the subdomain (sub.domain.com) I see the master domain (domain.com)

Thank you

It seems strange but the content of /var/www/domain.com and /var/www/clients/client1/web17/web are different. www.domain.com point to the first folder and domain.com to the second. When I use ftp to upload files, the files are stored in /var/www/domain.com

I see in the vhost file there is no "ServerAlias *.domain.com" and the document root folder pointed is /var/www/domain.com and not /var/www/clients/client1/web17/web. Can it be an issue?

Last edited by umano; 28th February 2010 at 19:09.
Reply With Quote
Sponsored Links
  #2  
Old 1st March 2010, 11:18
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,647
Thanks: 794
Thanked 5,003 Times in 3,912 Posts
Default

Looks to me as if you created tow different websites for domain.com and www.domain.com. Delete the www.domain.com website and then enable auto subdomain www or auto subdomain *. in the domain.com website.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 6th March 2010, 13:19
umano umano is offline
Junior Member
 
Join Date: Mar 2009
Posts: 21
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Sorry if I have answered a long, I want to be sure about what I write this time (quite sure ) there were not 2 website, It seemed to be 2 different folder because i tried to see the content of the folders using tab button to list the folder and not ls /var/www etc.

It's not only this, I was moving from another server in the same network, using the same IP's to avoid to change dns setting, and probably there were problems with vhost conf file.

For those reasons when i tried to point www.domain.com I saw the ispconfig standard page and when i tried to point a file uploaded via ftp I saw 404.

Using domain.com and domain.com/file.ext there were no problem.
I solved using Serveralias *.domain.com as u told me.

But I think the problem are not finished. I have a wordpress blog, I'm sure it's a server conf issue, because on the old server (ispconfig 3 as well) everything worked perfectly.

When I run a script I receive this error

Warning: touch() [function.touch]: Unable to create file ./cache/ecb0b79f00b91ec708ea6bacd212ea8f.jpg because Permission denied in /var/www/clients/client1/web14/web/wp-content/themes/magazeen/timthumb.php on line 150

I found another post with this solution usin chown (client1 and web 14 are correct and exists)
chown -R web14:client1 /var/www/clients/client1/web14/

This is my vhost file

<Directory /var/www/sub.domain.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<VirtualHost 123.123.123.123:80>
DocumentRoot /var/www/sub.domain.com/web

ServerName sub.domain.com
ServerAdmin webmaster@sub.domain.com

ErrorLog /var/log/ispconfig/httpd/sub.domain.com/error.log

ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 503 /error/503.html

<Directory /var/www/sub.domain.com/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client1/web14/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

# suexec enabled
SuexecUserGroup web14 client1
# mod_php enabled
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@mag.estrobinario.it"
php_admin_value upload_tmp_dir /var/www/clients/client1/web14/tmp
php_admin_value session.save_path /var/www/clients/client1/web14/tmp
php_admin_value open_basedir /var/www/clients/client1/web14/web:/var/www/clients/client1/web14/tmp:/usr/share/php5

<Directory /var/www/sub.domain.com/web/>
# BEGIN WordPress
<IfModule mod_rewrite.c>
AllowOverride All
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
</Directory>

Also doesn't work the uploader (also in php) in wordpress, the only way is to chmod the folder with 777

Thank you
Reply With Quote
  #4  
Old 6th March 2010, 13:22
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,647
Thanks: 794
Thanked 5,003 Times in 3,912 Posts
Default

You have to use php-fcgi + suexec or suphp if the web application in a website shall be able to write files into nthe webspace. You currently use mod_php, so wordpress can not create files at the moment.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 6th March 2010, 14:10
umano umano is offline
Junior Member
 
Join Date: Mar 2009
Posts: 21
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

Ok done now it works like a charm
Thanks a lot
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newb: How to redirect from domain.com to www.domain.com smartin Installation/Configuration 13 22nd February 2010 11:47
(Solution!) Redirect domain.com and co-domains to www.domain.com lubos Tips/Tricks/Mods 0 8th June 2009 02:28
Codomains - have domain.com redirect to www.domain.com? mxc General 4 2nd May 2009 11:17
domain.com & www.domain.com themoose General 4 27th November 2007 23:01
www.domain.com and domain.com patfee Tips/Tricks/Mods 3 12th November 2007 08:33


All times are GMT +2. The time now is 06:00.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.