Fedora Linux Support Community & Resources Center
  #1  
Old 15th September 2007, 03:04 PM
merrill Offline
Registered User
 
Join Date: Aug 2007
Posts: 28
symbolic linking

We have an apache web server up and running on a backup server, we get the standard if you can read this page for apache, what we would like to have help with linking this apache server to files on another partion where we have ample room for this to work.

Any help in this area would be appreciated!
Reply With Quote
  #2  
Old 15th September 2007, 04:29 PM
vinbob Offline
Registered User
 
Join Date: May 2006
Location: Cheshire, UK
Posts: 108
Edit /etc/httpd/conf/httpd.conf and change the DocumentRoot paths to your new web file directory
Reply With Quote
  #3  
Old 15th September 2007, 05:04 PM
merrill Offline
Registered User
 
Join Date: Aug 2007
Posts: 28
but when we point to this directory all we want to show is an index of file such as you would see on an FTP site
Reply With Quote
  #4  
Old 15th September 2007, 05:24 PM
vinbob Offline
Registered User
 
Join Date: May 2006
Location: Cheshire, UK
Posts: 108
Ahh..
All you need to do to disable the Welcome page is to edit the /etc/httpd/conf.d/welcome.conf file and comment out all the lines.
e.g.
Code:
#
# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL.  To disable the Welcome page, comment
# out all the lines below.
#
#<LocationMatch "^/+$">
#    Options -Indexes
#    ErrorDocument 403 /error/noindex.html
#</LocationMatch>
Then so long as your DocumentRoot Options line in httpd.conf includes Indexes and FollowSymLinks (if you indend to use symbolic links) you will have a pure indexing site.


Once you made changes to the config files you need to restart the web server
e.g. As root...
Code:
service httpd restart

Last edited by vinbob; 15th September 2007 at 06:13 PM.
Reply With Quote
  #5  
Old 15th September 2007, 05:56 PM
vinbob Offline
Registered User
 
Join Date: May 2006
Location: Cheshire, UK
Posts: 108
Quote:
The line is in the conf. file but we are not sure of how to link this to our file.
Our file reside at /work2/www/html

how do we point it there

just a windows guy here
I'll expand on my earlier post.
Open a terminal and login as root
Code:
su -
Open up /etc/httpd/conf/httpd.conf for editing
Code:
nano /etc/httpd/conf/httpd.conf
Then find the following section....
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 "/var/www/html"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
... and change to match the following...
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 "/work2/www/html"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
    Options Indexes FollowSymLinks
    AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/work2/www/html">

Then edit the /etc/httpd/conf.d/welcome.conf file
Code:
nano /etc/httpd/conf.d/welcome.conf
Change this bit...
Code:
<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>
Sot it looks like this...
Code:
#<LocationMatch "^/+$">
#    Options -Indexes
#    ErrorDocument 403 /error/noindex.html
#</LocationMatch>
Then restart the web server...
Code:
service httpd restart

Last edited by vinbob; 15th September 2007 at 06:01 PM.
Reply With Quote
  #6  
Old 15th September 2007, 06:03 PM
merrill Offline
Registered User
 
Join Date: Aug 2007
Posts: 28
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster
Error 403
192.168.1.200
Sat 15 Sep 2007 12:02:39 PM CDT
Apache/2.0.40 (Red Hat Linux)

this is what we see now
Reply With Quote
  #7  
Old 15th September 2007, 06:08 PM
vinbob Offline
Registered User
 
Join Date: May 2006
Location: Cheshire, UK
Posts: 108
OK looks as if you've done the right thing so far but your /work2/www/html directory has the wrong permissions set, therefore the web server does not have permission to access the directory.

As root, set the correct permissions as below;
Code:
chmod -R 755 /work2/www

Last edited by vinbob; 15th September 2007 at 06:11 PM.
Reply With Quote
  #8  
Old 15th September 2007, 06:14 PM
merrill Offline
Registered User
 
Join Date: Aug 2007
Posts: 28
ok, we can go to the directory that we specify, is there a way to go straight to the parent directory
Reply With Quote
  #9  
Old 15th September 2007, 06:20 PM
vinbob Offline
Registered User
 
Join Date: May 2006
Location: Cheshire, UK
Posts: 108
Quote:
Hi Merrill is gone to help his wife, when the web page is viewed we would like the directory /work2/www/html to show all its files and directories.


We dont know how to do that. As of right now when we view the page we get the Apache Test page the when we add a directory name to the address bar we then can view the directory but we are unable to see what diffrent directories are available.

Thanks
Mark
Hi Mark,

Right, well I showed you how to disable the Apache test page earlier.
It's the bit about editing the /etc/httpd/conf.d/welcome.conf file.
Do that and you won't get the Apache test page, you'll just see an index of the available directories.

Last edited by vinbob; 15th September 2007 at 07:18 PM.
Reply With Quote
  #10  
Old 15th September 2007, 07:32 PM
merrill Offline
Registered User
 
Join Date: Aug 2007
Posts: 28
on our machine there is not a file named welcome.conf any where on the server
Reply With Quote
  #11  
Old 15th September 2007, 07:35 PM
merrill Offline
Registered User
 
Join Date: Aug 2007
Posts: 28
Below is the files located in the /etc/httpd/conf.d

drwxr-xr-x 2 root root 4096 Apr 1 2004 .
drwxr-xr-x 4 root root 4096 Apr 1 2004 ..
-rw-r--r-- 1 root root 3420 Jan 24 2003 auth_mysql.conf
-rw-r--r-- 1 root root 3424 Jan 24 2003 auth_pgsql.conf
-rw-r--r-- 1 root root 30 Jan 25 2003 htdig.conf
-rw-r--r-- 1 root mailman 449 Jan 31 2003 mailman.conf
-rw-r--r-- 1 root root 814 Feb 10 2003 perl.conf
-rw-r--r-- 1 root root 459 Feb 25 2003 php.conf
-rw-r--r-- 1 root root 1276 Feb 20 2003 python.conf
-rw-r--r-- 1 root root 180 Feb 25 2003 README
-rw-r--r-- 1 root root 96 Feb 10 2003 squirrelmail.conf
-rw-r--r-- 1 root root 11140 Feb 25 2003 ssl.conf
-rw-r--r-- 1 root root 117 Feb 12 2003 wordtrans.conf
[root@backup conf.d]#
Reply With Quote
  #12  
Old 15th September 2007, 08:01 PM
vinbob Offline
Registered User
 
Join Date: May 2006
Location: Cheshire, UK
Posts: 108
Can you post the output of;
Code:
cat /etc/httpd/conf/httpd.conf
I'll have a look at your current configuration.

Last edited by vinbob; 15th September 2007 at 08:09 PM.
Reply With Quote
  #13  
Old 15th September 2007, 08:26 PM
merrill Offline
Registered User
 
Join Date: Aug 2007
Posts: 28
would only let me send 10,000 characters so i had to delete many refrence lines.

[root@backup conf.d]# cat /etc/httpd/conf/httpd.conf
#
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 150
MaxRequestsPerChild 1000
</IfModule>

# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>


<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>


#
#Listen 12.34.56.78:80
Listen 80

#
# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf

#
# Dynamic Shared Object (DSO) Support

#
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so

<IfModule prefork.c>
LoadModule cgi_module modules/mod_cgi.so
</IfModule>

<IfModule worker.c>
LoadModule cgid_module modules/mod_cgid.so
</IfModule>



#
User apache
Group apache

#
ServerAdmin info@hioutlet.com

#
#ServerName new.host.name:80


#
UseCanonicalName Off
#
DocumentRoot "/work2/www/html"

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>



#
<Directory "/work2/www/html">


Options Indexes FollowSymLinks

of the keywords:


AllowOverride None

Order allow,deny
Allow from all

</Directory>

<LocationMatch "^/$>
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>

<IfModule mod_userdir.c>
#

UserDir disable

#UserDir public_html

</IfModule>

GET POST OPTIONS>

AccessFileName .htaccess

<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

TypesConfig /etc/mime.types

DefaultType text/plain

<IfModule mod_mime_magic.c>
# MIMEMagicFile /usr/share/magic.mime
MIMEMagicFile conf/magic
</IfModule>

HostnameLookups Off

ErrorLog logs/error_log

LogLevel warn

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 logs/access_log combined
#
ServerSignature On

Alias /icons/ "/var/www/icons/"

<Directory "/var/www/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Alias /manual "/var/www/manual"

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

<IfModule mod_dav_fs.c>
# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb
</IfModule>


ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<IfModule mod_cgid.c>

Scriptsock run/httpd.cgid
</IfModule>


#
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

IndexOptions FancyIndexing VersionSort NameWidth=*

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^^

ReadmeName README.html
HeaderName HEADER.html

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddEncoding x-compress Z
AddEncoding x-gzip gz tgz

AddLanguage da .dk
AddLanguage ltz .ltz
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .se
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage tw .tw
AddLanguage zh-tw .tw
AddLanguage hr .hr

LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ltz ca es sv 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

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-tar .tgz

AddHandler imap-file map

AddHandler type-map var

AddOutputFilter INCLUDES .shtml

Alias /error/ "/var/www/error/"

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<Directory "/var/www/error">
AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback
</Directory>

ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
ErrorDocument 410 /error/HTTP_GONE.html.var
ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var
ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

</IfModule>
</IfModule>

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

webmaster@dummy-host.example.com

[root@backup conf.d]#
Reply With Quote
  #14  
Old 15th September 2007, 08:40 PM
vinbob Offline
Registered User
 
Join Date: May 2006
Location: Cheshire, UK
Posts: 108
Right then, the bit that goes...
Code:
<LocationMatch "^/$>
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
... comment it out and restart the web server.

The test page will now be disabled.
Reply With Quote
  #15  
Old 15th September 2007, 08:43 PM
merrill Offline
Registered User
 
Join Date: Aug 2007
Posts: 28
You the man

Thanks you so much that worked...
Reply With Quote
Reply

Tags
linking, symbolic

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
linking to X11 in FC9 x86 GeoDaveX Using Fedora 2 13th October 2008 11:12 AM
Symbolic Linking badtxmojojr Installation, Upgrades and Live Media 5 5th March 2008 01:38 PM
Linking /var/tmp and /tmp mauldus Using Fedora 0 2nd March 2006 02:52 AM
Linking? santabruzer Programming & Packaging 0 15th September 2004 12:31 AM


Current GMT-time: 11:35 (Saturday, 20-12-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
...Creek Side - Stockholm-Arlanda Airport (ARN) Travel Photos on Instagram - Marina of Koper Travel Photos - Te Whiti Park Instagram Photos - Texas State Fair Photos on Instagram