LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-01-2016, 07:08 PM   #16
jetberrocal
Member
 
Registered: Feb 2010
Posts: 45

Original Poster
Rep: Reputation: 15

I have not done your last suggestions. I don't know why the thread changes/additions are not being notified to my email even that I am supposedly registered to the thread and set to receive notifications immediately. As soon as I can do your request I will post back.

By the way I did not install nfs-client itself but nfs-common.
 
Old 12-02-2016, 02:29 PM   #17
jetberrocal
Member
 
Registered: Feb 2010
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by szboardstretcher View Post
What I am wondering now is ... try this ...

Code:
cd /var/www/html
ln -s /diskb/sarg/sarg-reports/TEXTFILE asymlink
echo "HELLO" > /diskb/sarg/sarg-reports/TEXTFILE
then try to hit http://yourserver/asymlink
I did that and it worked.

I see a web page with the word HELLO.

By the way I executed the command lines with root user
 
Old 12-02-2016, 02:42 PM   #18
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Ok. So YOUR original symlink is pointing to a directory and not a file.

Code:
LINKS
lrwxrwxrwx 1 root root   24 Nov 21 14:09 sarg-reports -> /diskb/sarg/sarg-reports
lrwxrwxrwx 1 root root   30 Nov 21 14:11 sarg-reports-squid -> /diskb/sarg/sarg-reports-squid

DIRECTORIES
drwxr-xr-x 2 root       root       64 Nov 23 11:30 sarg-reports
drwxr-xr-x 2 root       root       64 Nov 23 11:53 sarg-reports-squid
My TEST symlink points to a FILE and proves that NFS is working, permissions are correct, and symlinks are allowed.

Looking back at our conversation and your symlinks - are you pointing to a directory on purpose? Do you want to display the directory contents in the browser? is that what you are trying to do?

If so, then look up DirectoryIndex and configure it correctly for your server.

If not, then create your symlink to point to a file instead of a directory.

Last edited by szboardstretcher; 12-02-2016 at 03:15 PM.
 
1 members found this post helpful.
Old 12-02-2016, 02:59 PM   #19
jetberrocal
Member
 
Registered: Feb 2010
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by szboardstretcher View Post
Ok. So YOUR original symlink is pointing to a directory and not a file.

Code:
LINKS
lrwxrwxrwx 1 root root   24 Nov 21 14:09 sarg-reports -> /diskb/sarg/sarg-reports
lrwxrwxrwx 1 root root   30 Nov 21 14:11 sarg-reports-squid -> /diskb/sarg/sarg-reports-squid

DIRECTORIES
drwxr-xr-x 2 root       root       64 Nov 23 11:30 sarg-reports
drwxr-xr-x 2 root       root       64 Nov 23 11:53 sarg-reports-squid
My TEST symlink points to a FILE and proves that NFS is working, permissions are correct, and symlinks are allowed.

Looking back at our conversation and your symlinks - are you pointing to a directory on purpose? Do you want to display the directory contents in the browser? is that what you are trying to do?

If so, then look up DirectoryIndex and configure it correctly for your server.

If not, then create your symlink to point to a file instead of a directory.

Please click yes on all the posts you found helpful to increase my reputation.
Yes, I am pointing it to a Directory on purpose. I want to display all web pages and subdirectories web pages inside the Directory.
 
Old 12-02-2016, 03:14 PM   #20
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Right on. Try this configuration (notice the + ), restart apache, then:

Code:
<Directory /var/www/>
        Options +Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
 
Old 12-02-2016, 03:17 PM   #21
jetberrocal
Member
 
Registered: Feb 2010
Posts: 45

Original Poster
Rep: Reputation: 15
apache2.conf has:

Code:
<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
I should change to?:

Code:
<Directory /var/www/>
        Options Indexes FollowSymLinks
        DirectoryIndex index.html
        AllowOverride None
        Require all granted
</Directory>
Or to?

Code:
<Directory /var/www/>
        Options Indexes FollowSymLinks
        DirectoryIndex disable
        AllowOverride None
        Require all granted
</Directory>
I want apache to make its own index file if it does not found any index file
 
Old 12-02-2016, 03:24 PM   #22
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
For starters, add a plus sign + to Indexes,.. like this

Code:
Options +Indexes FollowSymLinks
And see if that gets us a directory listing.
 
Old 12-02-2016, 03:40 PM   #23
jetberrocal
Member
 
Registered: Feb 2010
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by szboardstretcher View Post
For starters, add a plus sign + to Indexes,.. like this

Code:
Options +Indexes FollowSymLinks
And see if that gets us a directory listing.

Service failed to start.

Code:
root@e2guardian:/etc/apache2# journalctl -xn
-- Logs begin at Thu 2016-10-27 11:45:12 AST, end at Fri 2016-12-02 17:36:51 AST. --
Dec 02 17:35:13 e2guardian apache2[21043]: AH00526: Syntax error on line 165 of /etc/apache2/apache2.conf:
Dec 02 17:35:13 e2guardian apache2[21043]: Either all Options must start with + or -, or no Option may.
Dec 02 17:35:13 e2guardian apache2[21043]: Action 'configtest' failed.
Dec 02 17:35:13 e2guardian apache2[21043]: The Apache error log may have more information.
Dec 02 17:35:13 e2guardian systemd[1]: apache2.service: control process exited, code=exited status=1
Dec 02 17:35:13 e2guardian systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Dec 02 17:35:13 e2guardian systemd[1]: Unit apache2.service entered failed state.
I will add the + sign to Followsymlinks to verify
 
Old 12-02-2016, 03:46 PM   #24
jetberrocal
Member
 
Registered: Feb 2010
Posts: 45

Original Poster
Rep: Reputation: 15
I added the + sign to the options.

Code:
<Directory /var/www/>
        Options +Indexes +FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

Service started successfully.

Tried and got:

You don't have permission to access /sarg-reports-test on this server.
You don't have permission to access /sarg-reports-test/index.html on this server.

Last edited by jetberrocal; 12-02-2016 at 03:48 PM.
 
  


Reply

Tags
apache, nfs, symlinks


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to mount a nfs mount from linux client to AIX nfs server dennyqian AIX 13 04-11-2016 11:30 PM
How to make a Linux rescue disc mount NFS volumes monkey_c Linux - Software 3 01-25-2013 12:43 PM
I'm working with symlinks with mount command to mount remote shares lhorace Linux - Newbie 1 11-21-2009 04:05 PM
mount.nfs: mount to NFS server 'jesse' failed: timed out, retrying keupie Linux - Networking 3 06-05-2009 07:03 PM
What would make an NFS mount EXTREMELY slow ? lostboy Linux - General 3 06-17-2004 09:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration