LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 09-19-2002, 08:11 AM   #1
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Rep: Reputation: 30
port 80 displays "Index of" and file table


I am trying to set up a webpage using ezpublish content management. I can display sites using the testing ports but can't when I attempt to use port 80. instead, a web page entitled "Index of" displays with a file table.

I used the defaults with the linux installer and installed the following packages on a stand alone Redhat 7.3 server:
eZ publish 2.2.6
MySQL 3.23.40
Apache 1.3.20
PHP 4.1.2
ImageMagick 5.3.7


TROUBLESHOOTING: I have attempted both listen (both 80 and ip-address80) and port 80 options in the eZconfig.included and in the httpd.conf. my eZconfig.included is as follows:

Listen 1337
Listen 1338
Port 1337
User nobody
Group nobody
******************************************
the DirectoryIndex variable from httpd.conf is:

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>

DocumentRoot "/opt/ezpublish/sites/defaullt"

Last edited by rioguia; 09-19-2002 at 11:09 AM.
 
Old 09-19-2002, 09:10 AM   #2
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Check the DirectoryIndex variable in the httpd.conf
 
Old 09-19-2002, 09:14 AM   #3
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Original Poster
Rep: Reputation: 30
from my httpd.conf file

This is from my hppd.conf file.

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>
 
Old 09-19-2002, 09:40 PM   #4
geoffm33
Member
 
Registered: May 2002
Distribution: RH 7.3 - YDL 2.3
Posts: 63

Rep: Reputation: 15
Look for the section including ' DocumentRoot' in your httpd.conf file.

It will look like this:


Code:
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/usr/local/apache/htdocs"
Like rioguia said, check the DirectoryIndex value and make sure there is a file called index.htm or index.html in the document root directory. Depending on what the DirectoryIndex value is set to.
 
Old 09-21-2002, 09:49 PM   #5
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Original Poster
Rep: Reputation: 30
virtual hosting issues?

In response to your question, the directorindex vaule from httpd.conf is provided below (but i'm not sure how to proceed):

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>


HERE ARE SOME OTHER THINGS I HAVE TRIED

It looks like this is set up to use name-based virtual hosting. I've tried various ways of changing the virtual hosting config files (see the last four lines of the vitural hosting script below) but nothing seems to make a difference. I can't even decide if this is an apache problem or a PHP problem. I think it is an apache problem because the site works fine on the default ports for the user and admin versions of the site. I just can't make them respond to port 80. When I try I either get "connection refused" or I get the default "Index of" displaying the file tree.

If anyone can lend some insight I would be grateful.

In response to some of mychal's comments, i've determined that some of the relevant files are as follows:

document root =
Directory /opt/ezpublish/sites/default
server root =
/opt/ezpublish/apache-1.3.20

The virtual hosting configuration suggested bby the code's authors are setforth below. The virtual hosting file that is actually running the site is included in httpd.conf by reference to four files. they are simple and an example is set forth below as well
**********************************************
<SUGGESTED VIRTUAL CONFIGURATION

VirtualHost IP.NUM.BE.RS>
<Directory /opt/ezpublish/sites/default>
Options FollowSymLinks
AllowOverride None
</Directory>
RewriteEngine On
RewriteRule ^/stats/store/(.*).gif$ /opt/ezpublish/sites/default/ezstats/user/storestats.php [S=4]
RewriteRule ^/filemanager/filedownload/([^/]+)/(.*)$ /opt/ezpublish/sites/default/ezfilemanager/files/$1 [T="application/oct-stream",S=3]
RewriteRule .*/ezmediacatalogue/catalogue/(.*)$ /opt/ezpublish/sites/default/ezmediacatalogue/catalogue/$1 [T="application/oct-stream",S=2]
RewriteRule ^/xmlrpc.*$ /opt/ezpublish/sites/default/index_xmlrpc.php [S=1]
RewriteRule !\.(gif|css|jpg|png|jar)$ /opt/ezpublish/sites/default/index.php

ErrorLog logs/error-substantis.com
CustomLog logs/totals-substantis.com combined

ServerAdmin rioguia@xxxxxxx.com
DocumentRoot /opt/ezpublish/sites/default
ServerName xxxx.com
</VirtualHost>
<VirtualHost IP.NUM.BE.RS>
<Directory /opt/ezpublish/sites/default>
Options FollowSymLinks
AllowOverride None
</Directory>
RewriteEngine On
RewriteRule .*/ezmediacatalogue/catalogue/(.*)$ /opt/ezpublish/sites/default/ezmediacatalogue/catalogue/$1 [T="application/oct-stream",S=1]
RewriteRule !\.(gif|css|jpg|png|jar) /opt/ezpublish/sites/default/index_admin.php

ServerAdmin rioguia@xxxx.com
DocumentRoot /opt/ezpublish/sites/default
ServerName admin.xxxx.com
</VirtualHost>
*******************************************
CURRENT VIRTUAL CONFIGURATION FROM HTTPD.CONF IS AS FOLLOWS:

#</VirtualHost>

include conf/virtual_hosts/default_user_site.conf
include conf/virtual_hosts/default_admin_site.conf
include conf/virtual_hosts/lo_user_site.conf
include conf/virtual_hosts/lo_admin_site.conf
************************************************
THE REFERENCED FILES LOOK LIKE THIS:
<VirtualHost IP.NUM.BE.RS:1337>
<Directory /opt/ezpublish/sites/default>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
</Directory>

RewriteEngine On
RewriteRule ^/stats/store/(.*).gif$ /opt/ezpublish/sites/default/ezstats/user/storestats.php [S=4]
RewriteRule .*/ezmediacatalogue/catalogue/(.*)$ /opt/ezpublish/sites/default/ezmediacatalogue/catalogue/$1 [T="application/oct-stream",S=3]
RewriteRule /xmlrpc.*$ /opt/ezpublish/sites/default/index_xmlrpc.php [S=2]
RewriteRule ^/filemanager/filedownload/([^/]+)/(.*)$ /opt/ezpublish/sites/default/ezfilemanager/files/$1 [T="application/oct-stream",S=1]
RewriteRule !\.(gif|css|jpg|png)$ /opt/ezpublish/sites/default/index.php

ServerAdmin root@localhost
DocumentRoot /opt/ezpublish/sites/default
ServerName XXXX.com
</VirtualHost>
 
Old 09-21-2002, 10:10 PM   #6
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
>| <Directory /opt/ezpublish/sites/default>
>| Options FollowSymLinks Indexes ExecCGI
>| AllowOverride None
>| </Directory>

Options Indexes --> turns on indexing

remove "indexes" from options to remove indexing
 
Old 09-22-2002, 04:01 PM   #7
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Original Poster
Rep: Reputation: 30
i tried AltF4's suggestion but it didn't seem to have any effect. the server still continues to refuse a connection when the site's domain name is requested by a browser unless the specified ports (1337 and 1338) are called. this content management system is supposed to set up a user site (1337) and an admin site (1338) to administer the default site. The index.php file that i think it is supposed to display is found in the document root directory "default."

here is the output of:
find /opt/ezpublish/sites/default/*index*

/opt/ezpublish/sites/default/index_admin.php
/opt/ezpublish/sites/default/index.php
/opt/ezpublish/sites/default/index_verify.php
/opt/ezpublish/sites/default/index_xmlrpc.php


I have included the first few lines of the code here because they seem to relate to the index. if my interpreation is correct:

1. the first line after the headers, ereg is a regular expression to look for some specific patterns in data, like the document root in this case and places it in an array $regs. The array works like this, if ereg found the entire match for the string, then it places in $regs[0], if ereg found a match for the string starting at the first left parenthesis, it goes in $regs[1]; if ereg found a match for the string starting at the first left parenthesis, it goes in $regs[2] if ereg matches the string starting at the second parenthesis.

2. the second line looks like it gives the variable "SiteDir"] the value the match for the string start at the first left parenthesis.

3. third line sets up the index relative to the string match recorded in $regs[2]?
************************************************

header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
header( "Cache-Control: no-cache, must-revalidate" );
header( "Pragma: no-cache" );

// Find out, where our files are.
if ( ereg( "(.*/)([^\/]+\.php)$", $SCRIPT_FILENAME, $regs ) )
{
$siteDir = $regs[1];
$index = "/" . $regs[2];

Last edited by rioguia; 09-22-2002 at 09:37 PM.
 
Old 09-23-2002, 09:49 AM   #8
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Original Poster
Rep: Reputation: 30
apache permission problem?

After hacking with the code for a week, i determined that i could not test with confidence (because i might not be accounting for changes to the code i had made).

I uninstalled and reinstalled (as root) using the linux installer defaults except for specifying port 80 for the user site (and port 1338 for the admin site). I can access and use the admin and user site from the browser on the server itself. I can access access the admin site from a remote pc but not the user site. Instead I get the following message (I have "x-ed out" t my domain name for illustrative purposes), "Error InterScan HTTP Version 3.6-Build_SOL_1224 $Date: 05/08/2002 15:14:0040$ Connecting to www.xxxxxx.com: Connection refused"

this has to be an apache problem but i can't seem to figure it out.
 
Old 09-23-2002, 01:01 PM   #9
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
The default httpd.conf will have way back in the beginning, a LISTEN option.
All these apply BEFORE the Virtual Rules.
So, if Apache can't find a Virtual Domain that matches the http://requested.domain supplied by the browser, it will feed up the default settings.
Make a set of rules for the default 1st, then tune the Virtuals..

ServerType standalone
ServerRoot "/etc/httpd"
LockFile /var/run/httpd.lock
PidFile /var/run/httpd.pid
ScoreBoardFile logs/apache_runtime_status
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 35
MinSpareServers 5
MaxSpareServers 20
StartServers 8
MaxClients 80
MaxRequestsPerChild 1000
#Listen 80
DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi
Port 80
User apache
Group apache
ServerAdmin xxx@yyy.zzz
ServerName xxx.xxx.xxx.xxx
DocumentRoot /var/www/html/

From the manual http://httpd.apache.org/docs-2.0/mod...reference.html the directive list also notes where these can be used, reused and which takes preference.
You can have totally different settings for each virtual server.
If you keep getting a file list served up rather than your xxx.htm* page, it's because Apache can't find a document that matches the DirectoryIndex statement for the server it allocates to the browser request.

Regards,
Peter

Last edited by peter_robb; 09-23-2002 at 01:09 PM.
 
Old 09-25-2002, 11:52 AM   #10
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Original Poster
Rep: Reputation: 30
apache issue? ./clearcache.sh

thanks to everyone who was kind enough to help me with this. i'm pleased to announce that this problem is resolved. probably any and all of the coding sollutions suggested here were correct.

the only problem was that I did not ./clearcache.sh in the apache root after making the changes. without clearing the cache, apache kept serving the error message rather than the new code. if this doesn't seem like a sensible answer, its the only one i have to explain why the site just popped up after a clean reinstall and reworking the same solutions as before. the site is answering on port 80 and the admin site on its assigned port.

again thanks to all.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"no hardware acceleration", but GLXgears displays 650 FPS lowpingnoob Linux - Newbie 16 06-15-2005 01:32 AM
KMail Disaster - "index file" problems Riddick Linux - Software 0 11-30-2004 04:24 PM
How to port the result of "startx" to a file anchunlei Slackware 6 11-26-2004 06:11 AM
Redhat 9 system displays "Boot Failed" pwalden Red Hat 8 03-31-2004 03:22 PM
Box Won't Boot - just displays "ATI MACH64 BIOS P/N 113-49801-101" te3d Linux - Hardware 3 10-27-2003 03:11 PM


All times are GMT -5. The time now is 07:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration