[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Quick but urgent Apache configuration question

Posted on 2006-05-12
5
Medium Priority
?
222 Views
Last Modified: 2010-03-04
I recently made a stupid mistake, I changed linux distributions without making proper backups of certain files, the most important being httpd.conf.

The following is a brief description of my directory structure and where my files are located.

/srv/www/htdocs/alpha
/srv/www/htdocs/include

I want when I go to 192.168.1.102 (the static IP I have set up for my server) all the content in alpha to come up, however there is content in alpha that will call information from include. By which I mean I have content in alpha and need files in include and other sub directories to be accessible.

The following is a trimed down version of my httpd.conf file

# run under this user/group id
Include /etc/apache2/uid.conf
# - how many server processes to start (server pool regulation)
# - usage of KeepAlive
Include /etc/apache2/server-tuning.conf
ErrorLog /var/log/apache2/error_log
Include /etc/apache2/sysconfig.d/loadmodule.conf
Include /etc/apache2/listen.conf
Include /etc/apache2/mod_log_config.conf
Include /etc/apache2/sysconfig.d/global.conf
Include /etc/apache2/mod_status.conf
Include /etc/apache2/mod_info.conf
Include /etc/apache2/mod_usertrack.conf
Include /etc/apache2/mod_autoindex-defaults.conf

TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf

Include /etc/apache2/errors.conf
Include /etc/apache2/ssl-global.conf

<Directory />
    Options None
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

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

DirectoryIndex index.php index.html index.html.var

Include /etc/apache2/default-server.conf
Include /etc/apache2/sysconfig.d/include.conf
Include /etc/apache2/vhosts.d/*.conf

The following is a trimmed down version of my the default-server.conf

#
# Global configuration that will be applicable for all virtual hosts, unless
# deleted here, or overriden elswhere.
#
DocumentRoot "/srv/www/htdocs"

<Directory "/srv/www/htdocs">
 Options None
 AllowOverride None
 Order allow,deny
 Allow from all
</Directory>

Alias /icons/ "/usr/share/apache2/icons/"

<Directory "/usr/share/apache2/icons">
 Options Indexes MultiViews
 AllowOverride None
 Order allow,deny
 Allow from all
</Directory>

ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"

<Directory "/srv/www/cgi-bin">
 AllowOverride None
 Options +ExecCGI -Includes
 Order allow,deny
 Allow from all
</Directory>

<Directory "/srv/www/htdocs/alpha">
 AllowOverride Indexes
 Options None
 Order allow,deny
 Allow from all
</Directory>

Include /etc/apache2/conf.d/*.conf

Include /etc/apache2/conf.d/apache2-manual?conf
ServerName dell
ServerAdmin root@dell

Any ideas what I'm doing wrong and where?
0
Comment
Question by:mark_dh
  • 2
  • 2
5 Comments
 
LVL 15

Expert Comment

by:periwinkle
ID: 16667883
How are you trying to access the information which is in the alpha and includes directory?  Is it being accessed as a subdirectory like 192.168.1.102/alpha ?

If so, you need:

Alias /alpha /srv/www/htdocs/alpha
0
 

Author Comment

by:mark_dh
ID: 16668252
Ideally I would be able to access it via simply typing in 192.168.1.102
0
 
LVL 10

Accepted Solution

by:
sleep_furiously earned 1000 total points
ID: 16668295
I don't think the Alias is likely to do much, because /srv/www/htdocs is the document root, so /svr/www/htdocs/alpha filesystem path is already mapped to URL /alpha.  Or at least what ever else the Alias is supposed to be doing is lost on me.

What happens when you try to access content in /include?  Does this happen when accessing a directory or a file path (i.e. directory browsing might be disallowed).

Are the files in /includes Server Side Includes that are not being included? If so, have you (a) enabled mod_include (b) enabled Options Includes (c) checked XBitHack setting?

0
 
LVL 15

Expert Comment

by:periwinkle
ID: 16668703
Sleep - he is asking to be able to address content that is in the main directory, or either of these two subdirectories via the same url, i.e. 192.168.1.102.
0
 

Author Comment

by:mark_dh
ID: 16669031
Incidentally I tried the Alias just in case it might work, unfortunately it doesn't. Although simply changing the document root did, so thanx sleep_furiously no idea why I didn't think of that sooner.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month18 days, left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question