Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-20-2004, 02:12 PM
|
#1
|
|
Member
Registered: Sep 2003
Location: MidWest
Distribution: Kubuntu 9.04 (workstation) Debian 3.1r4 (file server) Knoppix (troubleshooting)
Posts: 191
Rep:
|
apache won't serve pages
Okay, technically this isn't a Linux question, but I have the server "running" on a Slackware 9.1 box. 24-hours ago it was serving up pages, ugly as they were, just fine. I started working on the pages, cp'd them to my server public share, mv'd them to the html docs directory and then, for some reason or another, it was late at night, I deleted the contents of the directory. Then I realized that I had, during a braindead moment, also mv'd my httpd-2.0.xxx files and directories into that same directory. Why is something I may never figure out. How to fix it is why I'm here.
I have downloaded and reinstalled Apache. Apparently, it's running. I can get to the www.myserver.com page, if it were only there. But the other, virtual hosted sites will not come up. I get an error indicating that the document could not be found.
I am including my httpd.conf file for any of you gurus to inspect and tell me where I dropped the ball on my reinstall. The httpd.conf file is pretty much as provided with apache with my virtual hosts added at the end. I have had to cut a lot of the comments out in order to get within the posting limits. I didn't really understand a lot of what's going on from the comments, anyway. If someone would like to give guidance as to what I can/need to take out to improve performance on this, I'd appreciate any lessons I can learn.
thanx in advance.
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file.
#
### Section 1: Global Environment
#
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/usr/local/apache2"
#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
#LockFile logs/accept.lock
</IfModule>
</IfModule>
#
# ScoreBoardFile: File used to store internal server process information.
#
<IfModule !mpm_netware.c>
<IfModule !perchild.c>
#ScoreBoardFile logs/apache_runtime_status
</IfModule>
</IfModule>
<IfModule !mpm_netware.c>
PidFile logs/httpd.pid
</IfModule>
Timeout 600
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
# worker MPM
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
# perchild MPM
<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>
# WinNT MPM
<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild 0
</IfModule>
# BeOS MPM
<IfModule beos.c>
StartThreads 10
MaxClients 50
MaxRequestsPerThread 10000
</IfModule>
# NetWare MPM
<IfModule mpm_netware.c>
ThreadStackSize 65536
StartThreads 250
MinSpareThreads 25
MaxSpareThreads 250
MaxThreads 1000
MaxRequestsPerChild 0
MaxMemFree 100
</IfModule>
# OS/2 MPM
<IfModule mpmt_os2.c>
StartServers 2
MinSpareThreads 5
MaxSpareThreads 10
MaxRequestsPerChild 0
</IfModule>
Listen 80
### Section 2: 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
User gary
Group #100
</IfModule>
</IfModule>
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin gdv@xxxxxxx.net
ServerName 192.168.128.15:80
UseCanonicalName Off
DocumentRoot "/home/www"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/home/www">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
UserDir public_html
DirectoryIndex index.html index.htm
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
TypesConfig conf/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
ErrorLog /var/log/apache/error_log
LogLevel debug
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/apache/access_log common
ServerTokens Prod
ServerSignature On
Alias /icons/ "/home/icons/"
Alias /images/ "/home/images/"
Alias /css/ "/home/css/"
Alias /script/ "/home/script/"
<Directory "/usr/local/apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/usr/local/apache2/manual$1"
<Directory "/usr/local/apache2/manual">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
<Files *.html>
SetHandler type-map
</Files>
SetEnvIf Request_URI ^/manual/de/ prefer-language=de
SetEnvIf Request_URI ^/manual/en/ prefer-language=en
SetEnvIf Request_URI ^/manual/es/ prefer-language=es
SetEnvIf Request_URI ^/manual/fr/ prefer-language=fr
SetEnvIf Request_URI ^/manual/ja/ prefer-language=ja
SetEnvIf Request_URI ^/manual/ko/ prefer-language=ko
SetEnvIf Request_URI ^/manual/ru/ prefer-language=ru
RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
</Directory>
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
<IfModule mod_cgid.c>
</IfModule>
<Directory "/usr/local/apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
IndexOptions FancyIndexing VersionSort
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddDefaultCharset ISO-8859-1
AddCharset ISO-8859-1 .iso8859-1 .latin1
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
AddCharset ISO-8859-3 .iso8859-3 .latin3
AddCharset ISO-8859-4 .iso8859-4 .latin4
AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5 .Big5 .big5
# For russian, more than one charset is used (depends on client, mostly):
AddCharset WINDOWS-1251 .cp-1251 .win-1251
AddCharset CP866 .cp866
AddCharset KOI8-r .koi8-r .koi8-ru
AddCharset KOI8-ru .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8 .utf8
AddCharset GB2312 .gb2312 .gb
AddCharset utf-7 .utf7
AddCharset utf-8 .utf8
AddCharset big5 .big5 .b5
AddCharset EUC-TW .euc-tw
AddCharset EUC-JP .euc-jp
AddCharset EUC-KR .euc-kr
AddCharset shift_jis .sjis
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler type-map var
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully
<IfModule mod_ssl.c>
Include conf/ssl.conf
</IfModule>
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin gdv@tranquility.net
DocumentRoot /home/www/
ServerName www.intelli-tek.us
ErrorLog /var/log/apache/error_log
CustomLog /var/log/apache/intelli-tek_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin gdv@tranquility.net
DocumentRoot /home/mmtic/
ServerName lyme.intelli-tek.us
</VirtualHost>
<VirtualHost *:80>
ServerAdmin gdv@tranquility.net
DocumentRoot /home/mmtic/
ServerName mmtic.intelli-tek.us
</VirtualHost>
<VirtualHost *:80>
ServerAdmin gdv@tranquility.net
DocumentRoot /home/gary/
ServerName gdv.intelli-tek.us
</VirtualHost>
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
|
|
|
|
11-20-2004, 02:18 PM
|
#2
|
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
I seem to be getting forbidden messages as if apache can't read the files. You have apache running with slightly odd permissions:
User gary
Group #100
Does this user have read access to files and read/execute access to directories?
|
|
|
|
11-20-2004, 02:29 PM
|
#3
|
|
Member
Registered: Sep 2003
Location: MidWest
Distribution: Kubuntu 9.04 (workstation) Debian 3.1r4 (file server) Knoppix (troubleshooting)
Posts: 191
Original Poster
Rep:
|
Quote:
Originally posted by david_ross
I seem to be getting forbidden messages as if apache can't read the files. You have apache running with slightly odd permissions:
User gary
Group #100
Does this user have read access to files and read/execute access to directories?
|
Thanks for the rapid response, david.
Initially, as in when you tried, no. the folder and files belonged to root in the root group. I have chown'd to gary and chgrp'd to users the mmtic folder, which is the one I currently have html docs in. I don't know if this will help you help me, but I still get a message stating mmtic.intelli-tek.us can not be found.
|
|
|
|
11-20-2004, 03:51 PM
|
#4
|
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
I get the error that mmtic.intelli-tek.us can't be found too but that is not an apache problem it is a dns problem. If I look up the domain there is no ip address returned:
rossy - trigger - Sat Nov 20 21:51:03
~> dig mmtic.intelli-tek.us +short
rossy - trigger - Sat Nov 20 21:52:02
~>
|
|
|
|
11-20-2004, 08:38 PM
|
#5
|
|
Member
Registered: Sep 2003
Location: MidWest
Distribution: Kubuntu 9.04 (workstation) Debian 3.1r4 (file server) Knoppix (troubleshooting)
Posts: 191
Original Poster
Rep:
|
Cool. At least now I can rest easy that it's not my server. The original site lyme.intelli-tek.us is serving up just fine (from that same directory on the server) so now I have to figure out why mmtic.intelli-tek.us isn't working. Do I need to talk with my friendly DNS server guru to get that added? I don't recall having to do that for the other site name, but it's been a few months and that was my first effort at setting up (1) a web server and (2) virtual hosts on a web server. My second effort isn't going as smoothly. 
|
|
|
|
11-21-2004, 07:44 AM
|
#6
|
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
Yes, you will need to contact the people who manage your DNS and ask for an A record to be setup for that domain pointing to your IP address.
|
|
|
|
12-08-2004, 09:37 PM
|
#7
|
|
Member
Registered: Sep 2003
Location: MidWest
Distribution: Kubuntu 9.04 (workstation) Debian 3.1r4 (file server) Knoppix (troubleshooting)
Posts: 191
Original Poster
Rep:
|
Thanx for the help.
I know this is a little delayed, but all I had to do was talk with the DNS admin and get an entry for mmtic.intelli-tek.us and wait about five minutes.
Now, to see if I can keep from crashing the server whilest I learn about Apache admin and all the joy involved in that.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:11 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|