0

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.

Guddu
  • 1,588
  • 4
  • 25
  • 53

2 Answers2

2

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.

Community
  • 1
  • 1
0

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}
nerkn
  • 1,867
  • 1
  • 20
  • 36