You are not logged in.

#1 2017-07-05 09:42:27

Zapman
Member
Registered: 2012-04-01
Posts: 63

[Solved]Apache 404 upon accessing user home dir [public html]

Hi

I just installed apache following the wiki. Everything works fine except ~/public_html. When i try to access it i get 404.
I didnt alter any conf files, just chmod public_html dir.

home/lab
drwxr-xr-x 1 lab lab 20 Ιούλ  4 22:15 public_html


public_html/:

-rw-r--r-x 1 lab lab 52 Ιούλ  4 22:15 index.html

access.log wrote:

local ip - - [05/Jul/2017:12:16:02 +0300] "GET / HTTP/1.1" 200 481
local ip - - [05/Jul/2017:12:16:02 +0300] "GET /favicon.ico HTTP/1.1" 404 976
local ip - - [05/Jul/2017:12:16:02 +0300] "GET /favicon.ico HTTP/1.1" 404 976
local ip - - [05/Jul/2017:12:16:08 +0300] "GET /lab HTTP/1.1" 404 976
local ip - - [05/Jul/2017:12:18:34 +0300] "GET / HTTP/1.1" 200 481
local ip - - [05/Jul/2017:12:19:02 +0300] "GET /lab HTTP/1.1" 404 976

Any ideas? I'm kinda stuck.. Thanks guyz

Last edited by Zapman (2017-07-05 16:29:17)

Offline

#2 2017-07-05 14:08:17

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [Solved]Apache 404 upon accessing user home dir [public html]

What URL are you using to access the home site in the browser?


Matt

"It is very difficult to educate the educated."

Offline

#3 2017-07-05 15:40:45

Zapman
Member
Registered: 2012-04-01
Posts: 63

Re: [Solved]Apache 404 upon accessing user home dir [public html]

"server's lan ip"/lab <-- lab is the users home dir

Last edited by Zapman (2017-07-05 15:41:28)

Offline

#4 2017-07-05 15:44:41

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: [Solved]Apache 404 upon accessing user home dir [public html]

You're missing the tilde. Try http://ip:ad:re:ss/~lab


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2017-07-05 16:06:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [Solved]Apache 404 upon accessing user home dir [public html]

To expand on the above, what that url is attempting to access (assuming default settings as you've indicated) would be a file at /srv/http/lab or /srv/http/lab/index.html.  No such file or directory exists, so you get a 404.  The tilde at the start of the resource name indicates that it is in /home/*/public_html where the * is filled in by what is after the tilde:

http://domain.tld/lab/index.html -> /srv/http/lab/index.html
http://domain.tld/~lab/index.html -> /home/lab/public_html/index.html


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2017-07-05 16:28:53

Zapman
Member
Registered: 2012-04-01
Posts: 63

Re: [Solved]Apache 404 upon accessing user home dir [public html]

Oh gosh! thats why i was stuck hhahhhah. I really couldn't see it.. Thank you all guyz!

Offline

Board footer

Powered by FluxBB