HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Canīt access custom index on websites (http://www.howtoforge.com/forums/showthread.php?t=60464)

jbuchmann 7th February 2013 03:08

Canīt access custom index on websites
 
Hi,

I followed up http://www.howtoforge.com/perfect-se...ot-ispconfig-3 and all works perfect, only suphp version is no longer in server and I have to install a new one.

I create two clients, DNS zones, sites and FTP user, I upload the content with no given error, but Im still see the default (welcome) page in each site instead of the uploaded files.

This is the content of one of the sites

Quote:

hosting:/etc/apache2/sites-available # cat phonevision.com.ar.vhost
<Directory /srv/www/phonevision.com.ar>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<VirtualHost *:80>
DocumentRoot /srv/www/phonevision.com.ar/web

ServerName phonevision.com.ar
ServerAlias www.phonevision.com.ar
ServerAdmin webmaster@phonevision.com.ar

ErrorLog /var/log/ispconfig/httpd/phonevision.com.ar/error.log

Alias /error/ "/srv/www/phonevision.com.ar/web/error/"
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 502 /error/502.html
ErrorDocument 503 /error/503.html

<IfModule mod_ssl.c>
</IfModule>

<Directory /srv/www/phonevision.com.ar/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>
<Directory /srv/www/clients/client2/web2/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>

<IfModule mod_ruby.c>
<Directory /srv/www/phonevision.com.ar/web>
Options +ExecCGI
</Directory>
RubyRequire apache/ruby-run
#RubySafeLevel 0
<Files *.rb>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>

<IfModule mod_python.c>
<Directory /srv/www/phonevision.com.ar/web>
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
</IfModule>

# cgi enabled
<Directory /srv/www/clients/client2/web2/cgi-bin>
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /srv/www/clients/client2/web2/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
# suexec enabled
<IfModule mod_suexec.c>
SuexecUserGroup web2 client2
</IfModule>
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# php as fast-cgi enabled
# For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
<IfModule mod_fcgid.c>
IdleTimeout 300
ProcessLifeTime 3600
# MaxProcessCount 1000
DefaultMinClassProcessCount 0
DefaultMaxClassProcessCount 100
IPCConnectTimeout 3
IPCCommTimeout 360
BusyTimeout 300
</IfModule>
<Directory /srv/www/phonevision.com.ar/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /srv/www/php-fcgi-scripts/web2/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /srv/www/clients/client2/web2/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /srv/www/php-fcgi-scripts/web2/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>


# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web2 client2
</IfModule>

<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /srv/www/clients/client2/web2/webdav>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
DavLockDB /srv/www/clients/client2/web2/tmp/DavLock
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>

</VirtualHost>
Sites are enabled, DNS correctly resolved, files are inside /srv/www/mydomain.com/web but I cannot see them,

one of the sites is www.phonevision.com.ar

External IP is 200.16.120.38

I read all docs available and still get no clue, any help will be appreciated.

Thanks in advance.

jb

till 7th February 2013 10:30

Delete the index.html file in /srv/www/mydomain.com/web/ and your custom index file like a index.php page will show up.

jbuchmann 7th February 2013 16:07

Quote:

Originally Posted by till (Post 291713)
Delete the index.html file in /srv/www/mydomain.com/web/ and your custom index file like a index.php page will show up.

I have already deleted the original index.html and upload with ftp user my own site (also named index.html):

Quote:

hosting:~ # ls -l /srv/www/phonevision.com.ar/web/
total 52
drwxr-xr-x 2 web2 client2 4096 Feb 6 04:05 cobertura
drwxr-xr-x 2 web2 client2 4096 Feb 6 04:05 contacto
drwxr-xr-x 2 web2 client2 4096 Feb 6 22:11 error
-rw-r--r-- 1 web2 client2 10895 Feb 6 04:05 index.html
drwxr-xr-x 3 web2 client2 4096 Feb 6 04:05 internet
drwxr-xr-x 3 web2 client2 4096 Feb 6 04:05 noticias
drwxr-xr-x 2 web2 client2 4096 Feb 6 04:04 rw_common
drwxr-xr-x 3 web2 client2 4096 Feb 6 04:05 servicios
drwxr-xr-x 2 root root 4096 Feb 6 22:11 stats
drwxr-xr-x 3 web2 client2 4096 Feb 6 04:05 telefonia
drwxr-xr-x 3 web2 client2 4096 Feb 6 04:05 tv
but I keep seeing welcome page as you can see at www.phonevision.com.ar

Thanks for your help

Best Regards

JB

till 7th February 2013 16:13

It might be that you see the index page from a differnt website. If you have more then one site on your server, ensure that you do not mix IP addresses and * in the site settings of the different sites.

jbuchmann 7th February 2013 16:30

Quote:

Originally Posted by till (Post 291732)
It might be that you see the index page from a differnt website. If you have more then one site on your server, ensure that you do not mix IP addresses and * in the site settings of the different sites.

That seems to be the problem, I have all sites with * under IPv4-Address, I change * for IP (200.16.120.38) and now I can see the webpage.

One more thing please, when I try to reach http://mysite.com/webmail instead of see Squirel web page it download the document, as is docs type in Apache were not configured

Quote:

<?php

/**
* index.php
*
* Redirects to the login page.
*
* @copyright 1999-2012 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: index.php 14249 2012-01-02 02:09:17Z pdontthink $
* @package squirrelmail
*/

// Are we configured yet?
if( ! file_exists ( 'config/config.php' ) ) {
echo '<html><body><p><strong>ERROR:</strong> Config file ' .
'&quot;<tt>config/config.php</tt>&quot; not found. You need to ' .
'configure SquirrelMail before you can use it.</p></body></html>';
exit;
}

// If we are, go ahead to the login page.
header('Location: src/login.php');
This works fine during installation as I check it when installing, but after uploading sites when I check allways download the file instead of executing it.

Thanks again,

JB

jbuchmann 7th February 2013 19:23

Quote:

Alias /squirrelmail /usr/share/squirrelmail
<Location /squirrelmail>
<IfModule suphp_module>
suPHP_Engine Off
AddHandler php5-script .php
</IfModule>
php_admin_value open_basedir "/usr/share/squirrelmail:/etc/squirrelmail:/etc/mailname:/etc/hostname"
</Location>
This code works, as is posted in http://www.howtoforge.com/forums/sho...t=52042&page=4

Sorry for ask before search.


All times are GMT +2. The time now is 16:14.

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