Apache default page (It works) location?

Greetings!

I just installled Apache2 on openSUSE, and when I go to my IP in a browser, I get a
"Access forbidden!

You don’t have permission to access the requested directory. There is either no index document or the directory is read-protected…" 403 error.

It seems to me there could be a default html I could point to in /srv/www/htdocs but i have not been able to locate it.

I was able to make a vhost.conf file to make my own site, or just put an index.html inside the above location, but could not get the default “It works!” page working! Note: it is for an assigment, but I am also curious!

I have been using Apache a bit in Ubuntu and Fedora, but this seems to have stumped me! Searched the web and will continue investigating/learning, but thought I’d ask you fine folks! (Even an AI couldn’t give me an answer, haha!)

Thanks in advance for the help, and I will gladly answer anything I may have forgotten to add.

Since this is an assignment, this URL is your starting point: The Apache HTTP server | Reference | openSUSE Leap 15.6

I have been there, and countless other pages, and, alas, cannot figure it out. Thanks kindly!

assignment: a task or piece of work assigned to someone as part of a job or course of study.
“a homework assignment”.

@knurpht beat me to the proper answer … research :+1:

It’s always more rewarding to complete an assignment on your own, versus asking for the answer.

: (
I think I found that there is no default “It Works” page, alas!

Install as per 24.1.2 Installation #

Thanks sir, I will give it a try!

I may come back tomorrow if it is okay!

P.S. Our instructor told us it is okay to seek help :wink: (And cautioned us about AI) :wink:

Thanks!

Edit to add, I came across a post of yours from years ago:

“browsing 127.0.0.1 displays “It works!!” which is the index.html placed in /srv/www/htdocs by the apache install”

So, perhaps I found a bug!?

Things change, so that might be outdated.
Tip: always include a link to what you quote

Does the apache service run?
Is the http port open in de firewall?

From: Running Apache under Open Suse - #5 by knurpht

Yes; enabled, and started the service. And checked status. Pre-opened both 80 and 443 (just in case) to be sure.

I added
ServerName 127.0.0.1
to the end of the httpd.conf, and it changed the error to 404, page cannot be found. Maybe some progress? : )

Oh, and here is a tutorial, last updated in July (of course things can still have changed perhaps) that says an Apache welcome page should appear: How to Install and Configure Apache on openSUSE or SLES? - GeeksforGeeks

Thanks!!

Oh, and finally, the error from the status

Oct 02 22:11:21 localhost.localdomain systemd[1]: Reloading The Apache Webserver…
Oct 02 22:11:21 localhost.localdomain start_apache2[4254]: AH00112: Warning: DocumentRoot [/srv/www/htdocs/domain] does not exist
Oct 02 22:11:21 localhost.localdomain start_apache2[4254]: AH00112: Warning: DocumentRoot [/srv/www/htdocs/otherdomain] does not exist

Create those folders? And give them the proper ownership and permissions?

I did once, however it is my own index.html page.

Thus, I guess the default page is missing, unless I missed something very obvious (would not rule that out)!

You need to provide output, like
ls -la /srv/www/htdocs/*
And state whether your own index.html works.

Apologies, it indeed works okay, my own page! :upside_down_face:

Alas, no default welcome page though! :smiling_face_with_tear:

I can report back with more details later, if any new news comes!

Thanks for the assistance!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.