Running web pages located outside webserver space


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Running web pages located outside webserver space
# 1  
Old 11-07-2010
Running web pages located outside webserver space

I can't find any good, active Apache forums, anyone know? Either way I'll ask once here.

Let's say all webpages on the server run from /var/www directory and you would like to store some webpages elsewhere on the filesystem and still the apache webserver can access them like they were located in /var/www. What's the way to do this? Hard links, symbolic links, httpd config, ?
# 2  
Old 11-07-2010
Using aliases?

From httpd.conf:
Code:
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path

This User Gave Thanks to Scott For This Post:
# 3  
Old 11-07-2010
Ah, that looks like another way to do it.

So the way I figure there's several ways to do this:
1) the one you mentioned
2) symbolic links
3) virtual hosting?
4) changing DocumentRoot

I'd imagine 4th might be frownable. Not sure if virtual hosting is advisable either, would it?
# 4  
Old 11-07-2010
Use virtualhosts and in the <Directory> section put in any directory on any server, any place. It's all magic but Apache will work it all out. Virtualhosts will require a new entry in the name server of course.

Bill
This User Gave Thanks to billconner For This Post:
# 5  
Old 11-07-2010
So if I plan to stick with the same server name, then I should probably not use virtual hosts? Sorry I'm a newbie to this stuff.
# 6  
Old 11-08-2010
Quote:
Originally Posted by stevenswj
2) symbolic links
Some changes to apache really cracked down on this method a few years ago, it got a lot more anal about the permissions of where the symlink goes, which broke a lot of working configurations. Probably better to avoid it now if you can.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Help with running a script on files located in subdirectories

Hello everyone, I'm am a newbie to coding so I am reaching out in hopes that I can get some help from this forum. I am trying to run the script below from a single directory, however the directory has many subfolders. In each of those subfolders is a file, uniquely named to that specific... (3 Replies)
Discussion started by: azurite
3 Replies

2. Shell Programming and Scripting

Get web pages and compare

Hello I'm writing a script to get content of web pages on different machines and compare them using their md5 hash hear is my code #!/bin/bash # Cluster 1 CLUSTER1_SERVERS="srv01:7051 srv02:7052 srv03:7053 srv04:7054" CLUSTER1_APPLIS="test/version.html test2/version.html... (2 Replies)
Discussion started by: gtam
2 Replies

3. Shell Programming and Scripting

Get web pages and compare

Hello, I'm writing a shell script to wget content web pages from multiple server into a variable and compare if they match return 0 or return 2 #!/bin/bash # Cluster 1 CLUSTER1_SERVERS="srv1 srv2 srv3 srv4" CLUSTER1_APPLIS="test/version.html test2.version.jsp" # Liste des... (4 Replies)
Discussion started by: gtam
4 Replies

4. Shell Programming and Scripting

Checking Web Pages?

Hey guys, Unfortunatley, I can not use wget on our systems.... I am looking for another way for a UNIX script to test web pages and let me know if they are up or down for some of our application. Has anyone saw this before? Thanks, Ryan (2 Replies)
Discussion started by: rwcolb90
2 Replies

5. UNIX for Dummies Questions & Answers

Forcing web pages to anti-aliase

Here is an observation that has started to riddle me and perhaps someone can enlighten me. When a web page (or desktop page for that matter) uses the standard font, it is not anti-aliased, unless the user opts in to do so via the desktop settings. It appears however that fonts are not... (0 Replies)
Discussion started by: figaro
0 Replies

6. UNIX for Dummies Questions & Answers

curl command with web pages

I can't quite seem to understand what the curl command does with a web address. I tried this: curl O'Reilly Media: Tech Books, Conferences, Courses, News but I just got the first few lines of a web page, and it's nowhere on my machine. Can someone elaborate? (2 Replies)
Discussion started by: Straitsfan
2 Replies

7. Shell Programming and Scripting

Investigating web pages in awk

hello. i want to make an awk script to search an html file and output all the links (e.g .html, .htm, .jpg, .doc, .pdf, etc..) inside it. also, i want the links that will be output to be split into 3 groups (separated by an empty line), the first group with links to other webpages (.html .htm etc),... (1 Reply)
Discussion started by: adpe
1 Replies

8. UNIX for Dummies Questions & Answers

Selecting information from several web pages...

Hi All! Is this possible? I know of several hundreds of urls linking to similar looking hp-ux man pages, like these. In these urls only the last words separated by / are changing in numbering, so we can generate these... http://docs.hp.com/hpux/onlinedocs/B3921-90010/00/00/31-con.html... (2 Replies)
Discussion started by: Vishnu
2 Replies

9. Shell Programming and Scripting

Count links in all of my web pages

Counts the number of hyperlinks in all web pages in the current directory and all of its sub-directories. Count in all files of type "*htm" and "*html" . i want the output to look something like this: Total number of web pages: (number) Total number of links: (number) Average number of links... (1 Reply)
Discussion started by: phillip
1 Replies

10. UNIX for Dummies Questions & Answers

Dynamic web pages for Unix Web Server

Hi, my company is considering a new development of our web site, which used to run on Apachi over Solaris. The company who is going to do this for us knows only about developing it in ASP. I guess this means we'll have to have another ISS server on NT for these dynamic pages :( What are... (5 Replies)
Discussion started by: me2unix
5 Replies
Login or Register to Ask a Question