Configuring Apache an php Directory root.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Configuring Apache an php Directory root.
# 1  
Old 06-11-2012
Question Configuring Apache an php Directory root.

Hi ,

I have installed apache and configured Document root as /home
Code:
DocumentRoot "/home"

The files under home directory is listed on the web server, i have one text file under "/home/test/1.txt" i can view the file when i set DocumentRoot to /home.

But when i change Document root to
Code:
DocumentRoot "/var/www/html"

i am not able to view the file
which is under test dir i.e the file
Code:
/home/test/1.txt

Can anyone please help me how to configure apache httpd.conf file such that
Document root must be
Code:
/var/www/html

and in mean time i can able to list and view/open file which is under my directory
Code:
/home/user/test/

through web browser.

Smilie
# 2  
Old 06-11-2012
MySQL

Under /var/www/html create a soft link to your directory /home/user/test/

Quote:
cd /var/www/html
ln -s /home/user/test/ .
This User Gave Thanks to kalpeer For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Solaris

SunOS confusing root directory and user home directory

Hello, I've just started using a Solaris machine with SunOS 5.10. After the machine is turned on, I open a Console window and at the prompt, if I execute a pwd command, it tells me I'm at my home directory (someone configured "myuser" as default user after init). ... (2 Replies)
Discussion started by: egyassun
2 Replies

2. UNIX for Dummies Questions & Answers

Removing directory with leading hyphen from root directory

I know that this basic question has been asked many times and solutions all over the internet, but none of the are working for me. I have a directory in the root directory, named "-p". # ls -l / total 198 <snip> drwxr-xr-x 4 root root 4096 Dec 3 14:18 opt drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: edstevens
2 Replies

3. UNIX for Dummies Questions & Answers

Allowing a backup of a directory through apache/php

I've made a webpage has a button that backs up the /var/www directory to a mounted USB drive. Assume that the page that this is on is completely safe and there is no way that anyone can see it. (unless actually relevant) PHP code for the button: (I'm quite sure this isn't the issue, it works... (2 Replies)
Discussion started by: cuvvvie
2 Replies

4. Shell Programming and Scripting

Need help configuring apache

In this configuration file I added in /etc/httpd/conf.d, lets call it application.conf, and for some cgi scripts found outside the document root for the apache server, lets call the foreign folder /path/to/scripts/outside/documentroot, I'd like to know how to get it where the user types in... (0 Replies)
Discussion started by: stevenswj
0 Replies

5. UNIX for Dummies Questions & Answers

How to display only Owner and directory/sub directory names under particular root

hai, I am new to Unix, I have a requirement to display owner name , directory or sub directory name, who's owner name is not equal to "oasitqtc". (here "oasitqtc" is the owner of the directory or sub directory.) i have a command (below) which will display all folders and sub folders, but i... (6 Replies)
Discussion started by: gagan4599
6 Replies

6. AIX

Problem:Configuring Apache 2.2.11 in AIX 5.3

Hi All I am new to Apache and AIX and trying to configure Subversion tool in IBM machine with AIX 5.3.Apache is required for client to connect to Subversion Server with http protocol. 1.Installed Apache 2.2.11 and its dependencies via RPM 2.Configured httpd.conf file. 3.Started "httpd"... (1 Reply)
Discussion started by: rajivdp
1 Replies

7. IP Networking

Change the root directory for apache, sshd and ftpd

Helo ! I want to do something and I don't know where to start... I want to make a small web hosting server (just for me and a few friends) and for the sake of learning I'd like to make an account for every user. The thing is that I want everyone to log into the server and to be put in his home... (3 Replies)
Discussion started by: Sergiu-IT
3 Replies
Login or Register to Ask a Question