1

ln -s /home/marcelo/MEGASync/localhost /var/www/html/

I am using symlink from terminal ubuntu to get all sites from my /home/marcelo/MEGASync/localhost/ to my www of my apache. I Access localhost from my browser and I get this:

flavio/        #I access these -----
one-site/
other-siter/
more-one-site/

I have this in my content of the path: localhost/flavio

nub/             #and now, I access these
flavio/
flavio2/

When I accessed this path in browser, I get this error:

Not Found  
The requested URL /nub was not found on this server.

But I have a structure of codeigniter in this path: /localhost/flavio/nub/

What's ocurred in this?
And how to I will solve this?

  • 4
    Apache by default won't follow unsafe (i.e. pointing outside of its DocumentRoot) symlinks. I think there's a config option that can be set to allow it, though. – Toby Speight May 16 '17 at 15:19
  • 1
    @TobySpeight If that's what the OP is asking, a better way to deal with it would be to just point DocumentRoot to /home/marcelo/MEGASync/localhost... – Satō Katsura May 16 '17 at 15:22
  • @SatoKatsura Good idea, I will go test this! – Alex May 16 '17 at 15:24
  • @SatoKatsura it seems to me that it gave me the same problem – Alex May 16 '17 at 16:41
0

I would ask you to check the status of selinux, if it's in enforcing mode then you should allow apache context for this path /home/marcelo/MEGASync/localhost

To check the selinux status :

sestatus

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.