Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu 10.04 (used to be Red Hat 7.1, then Red Hat 9, then FC 2, FC 5, FC 6, FC 9 and Ubuntu 8.04)
Posts: 105
Rep:
Check if selinux is enabled. If it is then try disabling it and test again. If it works when selinux is disabled, then you need to set the web documents directory correctly for selinux to allow access.
Check if selinux is enabled. If it is then try disabling it and test again. If it works when selinux is disabled, then you need to set the web documents directory correctly for selinux to allow access.
It works but why do i need to change this file. What is the fix for the same. How directory directive should be configure in virtual host section for this to work.
It works but why do i need to change this file. What is the fix for the same. How directory directive should be configure in virtual host section for this to work.
It means that you don't have an index page, so with the 1st setup you get a 403 error (directory index forbidden), while with the 2nd you get a directory listing.
To "fix" it you need to add in the "DirectoryIndex" option the index page you're using
It means that you don't have an index page, so with the 1st setup you get a 403 error (directory index forbidden), while with the 2nd you get a directory listing.
To "fix" it you need to add in the "DirectoryIndex" option the index page you're using
Now i am getting new error. could you tell me the fix for this also plz.
Quote:
[root@GAIDL-5015 Packages]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
[root@GAIDL-5015 Packages]#
Thanks for replying,
I don't have index page in that directory but i want to show all files and folder for that directory. i got to know this can be achieved by using directory directive.
where should i add DirectoryIndex option. I am not using any index page.
service httpd restart
Stopping httpd: [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Most likely you are using 2 times the "Listen ..." directive:
Quote:
I don't have index page in that directory but i want to show all files and folder for that directory. i got to know this can be achieved by using directory directive.
If you want to list all files in a directory then you don't need an index page and you'll have to use the directive:
Most likely you are using 2 times the "Listen ..." directive:
If you want to list all files in a directory then you don't need an index page and you'll have to use the directive:
Code:
Options Indexes
Actually first problem was solved by kill httpd process which was using port number 80 and restarting service.
i have added
Code:
Options Indexes
in virtual host section but still i am not able to list all the files of that directory. i have put "hello world" index. html in that directory. instead of showing files it is showing the content of that index.html.
in virtual host section but still i am not able to list all the files of that directory. i have put "hello world" index. html in that directory. instead of showing files it is showing the content of that index.html.
This is how it works. If you use an index page, you cannot have a directory listing. From apache documentation:
Quote:
Indexes
If a URL which maps to a directory is requested, and there is no DirectoryIndex (e.g., index.html) in that directory, then mod_autoindex will return a formatted listing of the directory.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.