Score:0

Apache authentication via sql in fedora/rhel/almalinux/rocky linux

kr flag

on fedora I installed apache and mysql, I created the user with certain privileges and I populated the database, but I can't connect apache with sql. Can anyone help me on how to do it? I've tried editing my httpd.conf file but nothing, I would expect when I put my ip address on the browser it looks for my credentials, I enter my database credentials and access the page

Score:0
ws flag

Its not clear what you are trying to achieve, what your expections are here nor what you have already tried.

Apache can only do HTTP authentication (basic and digest) which is very limited / basic. It is convenient as a quick hack to keep people out of your website - but no more than that. As a quick hack solution, there doesn't seem to be a justifcation for using a database (requires additional modules) rather than just s simple .htpasswd file.

You DID NOT say

  • if you were trying to implement HTTP authentication or something more appropriate
  • how you created the user
  • how you changed the httpd.conf file
  • what happenned after you made these changes (browser behaviour, log entries)
Belbo avatar
kr flag
You're right, so I should set up an apache server and every time I type my ip address from my browser I should authenticate with the sql user credentials. For sql I simply made a db and inside a table with two users. I modified my httpd.conf file following the apache doc exactly like this: https://httpd.apache.org/docs/2.4/mod/mod_authn_dbd.html. However, when I go to put the credentials in my browser I get a 501 error
ws flag
Check your logs
Belbo avatar
kr flag
My logs are: [Mon Jun 12 15:55:09.062579 2023] [dbd:error] [pid 22000:tid 22000] (20014)Internal error (specific information not available): AH00629: Can't connect to mysql: Can't connect to server on '192.168.228.128' (13) [Mon Jun 12 15:55:09.062666 2023] [dbd:error] [pid 22000:tid 22000] (20014)Internal error (specific information not available): AH00633: failed to initialise [Mon Jun 12 15:55:09.062670 2023] [dbd:crit] [pid 22000:tid 22000] (20014)Internal error (specific information not available): AH00636: child init failed!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.