1

I have an LAMP Web server. It is working but, only can shows the web content under the www directory. The users, has got their own home folder /web page folder, but they are not reachable, because they are outside the www.

Can it be a permission problem?

How to fix it?

Sss
  • 1,022

1 Answers1

1

It can be both a permission and configuration problem.

The web server (user www-data) needs +x on every folder in the path, so for /home/username/web/, /home, /home/username/ and /home/username/web has to have the +x set for world. In addition /home/user/web has to have read permission for web server, and same for content.

In addition, Apache has to be configured for this. As you ask for a per user folder, I presume you're thinking about the typical example.com/~username?

This is traditionally the folder public_html with Apache. This is configured with the UserDir directive. This is fairly well documented in the Apache Documentation. Thus you'd have to add UserDir web to use the folder web instead of public_html.

vidarlo
  • 22,691
  • Hi, the +x is there, in the end of the permissions in every user's folders and the files inside. Strange... But I am after a web server migration. Old web sever to new web server. The old hardware was crashed. I could salvage the HDD. Every user has his or her web page in his or her home folder. And before the re installation, they cloud reach them. The main page was under the www directory, and there was a link toward the users home folder. Inside the webserver in their home folder I can open the index file and it is working, just for some reason, the server can not reach /call them. – István Radics Sep 26 '17 at 11:20
  • Have you updated the UserDir to point to your name of choice? What does the error log show? – vidarlo Sep 26 '17 at 11:21
  • It seems it was the solution. I updated it, and now the site from the home directory is reachable. Big Thanks. – István Radics Sep 26 '17 at 13:11