httpd error after install for Openldap - apache

I have made all the settings for openldap, less then httpd.
After I installed httpd, when I tried to start it with "serice httpd start",
display the following error:
[root#elara pub]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using ::1 for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
I understood from net, that i need to kill a process, but I'm very confused, because I'm nubbie in Linux.
Can' someone tell me a solution for my problem?

Sounds like you installed OpenLDAP incorrectly to listen at port 80. The correct port for LDAP is 389; 636 for LDAPS.

Related

AH00558: httpd: Could not reliably determine the server's fully qualified domain name,Set the 'ServerName' directive globally to suppress this message

I've tried to run apache server with
sudo apachectl start
sudo apachectl stop
and I encountered these errors
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using exampleui-MacBookPro.local. Set the 'ServerName' directive globally to suppress this message
(48)Address already in use: AH00072: make_sock: could not bind to address [::]:8080
(48)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8080
no listening sockets available, shutting down
AH00015: Unable to open logs
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Hoonui-MacBookPro.local. Set the 'ServerName' directive globally to suppress this message
httpd (pid 6276?) not running
So I searched stackoverflow and exchanged ServerName localhost in etc/apache2/httpd.conf file to ServerName localhost:8080 and it was uncommented already.
It didn't change even after changing ServerName into
localhost
localhost:80
localhost:8080
127.0.0.1
and I also tried to kill process with kill -9 pid but nothing changed

creating letsencrypt certificate fails

i'm on ubuntu 17.10 . looks like installed certbot successfully.
when i run
sudo certbot --apache -d mywebsite.com -d www.mywebsite.com
i get an error:
root#servername:~# sudo certbot --apache -d mywebsite.ca -d www.mywebsite.ca
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for mywebsite.ca
http-01 challenge for www.mywebsite.ca
Enabled Apache rewrite module
Error while running apache2ctl graceful.
httpd not running, trying to start
Action 'graceful' failed.
The Apache error log may have more information.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Any idea?
obviously apache is not running, but that's ok, i'm using nginx, so i don't need apache. or do i?
If you are running nginx server, use the nginx plugin (not apache):
sudo certbot --nginx -d mywebsite.com -d www.mywebsite.com

Apache Change Default User

I wish to run apache under a user named app_user. To achieve this I changed the following in the httpd.conf file
User app_user
Group app_user
app_user is a valid user and a group on this server.
The app_user has correct privileges to write in /var/log/httpd directory.
Now when i start apache it gives me this error.
[app_user#localhost conf]$ service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
Appreciate some help on this.
Only 'root' user can bind connections to ports lesser than 1024. For more information here. Either configure the apache to use different port number which is higher than 1024 or sudo as root user. Later option is not recommended.
Root should start apache main process to bind lower ports but, if you want to use different user/group for the sub processes you can configure through APACHE_RUN_USER and APACHE_RUN_GROUP environmental variables.
check /etc/apache2/apache2.conf:
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

ubuntu apache restart error

I am getting below error...
What to do?
* Restarting web server apache2 /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
To solve this problem You need set ServerName.
vim /etc/apache2/conf.d/name
For example set add ServerName localhost or any other name:
ServerName localhost
Restart Apache 2
service apache restart

Apache restart on Ubuntu - error "could not bind to address 0.0.0.0.80"

I'm a n00b - trying to get apache2 set up on Ubuntu 9.10 (Karmic Koala) on Rackspace Cloud. I have set up/configured OpenSSL and installed Apache, but Apache won't start. I assume its a misconfiguration in my /etc/apache2/sites-available/ssl or /etc/apache2/sites-available/default files)
When I try to restart apache using the command:
sudo /etc/init.d/apache2 restart
I get the following error message:
[error] (EAI 2)Name or service not known: Could not resolve host name *.80 -- ignoring!
[error] (EAI 2)Name or service not known: Could not resolve host name *.80 -- ignoring!
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
...fail!
For my /etc/apache2/sites-available/ssl I have used a virtual host of *:443.
For my /etc/apache2/sites-available/default i have used a virtual host of *:80
Turn off Skype. It's use port number 80 for incoming messages. Eventually check what use this port at the moment using netstat.
Second resolve is simply: Add ServerName localhost to main config. file.
Check /etc/hosts. Be sure that your machine name and localhost domain definition is correct (ie: "127.0.0.1 localhost.localdomain localhost"
However it is highly unlikely, check /etc/apache2/ports.conf if it contains explicitly "0.0.0.0"