0

I am trying to install cakephp ( a php framework) which requires to enable mod_rewrite. For this I followed Enable mod_rewrite answer. But after restarting my server It says:

nitish@nitish-G31T-M7:~$ service apache2 restart

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.

What this means? How can I enable mod_rewrite ?

Nitish
  • 103
  • 1
  • 3

1 Answers1

2

Did you remember to use sudo with the restart command?

If not, you have to have superuser abilities (sudo) to restart Apache. Try using sudo service apache2 restart instead. You need the superuser abilities to shut down the current instance, and then to start up a new one and bind to port 80.

Thomas Ward
  • 74,764
  • Oh Thanks @Thomas W. Its starting. But cakephp home page still says url is not properly configured URL rewriting is not properly configured on your server.. – Nitish Dec 04 '13 at 02:21
  • 1
    @Nitish that's a separate issue. Your question asks about the restart issue. I would suggest that you take a look at this guide by Digital Ocean's comunity that details all the steps to enable mod_rewrite. YOu also have to set up 'AllowOverride' everywhere rewrite is used to "All" according to multiple online guides about this. (Please also note I use NGINX as my webserver, not Apache, so beyond the starting-up issue here of you not using sudo, my ability to help with the cakephp issues is limited with Apache) – Thomas Ward Dec 04 '13 at 02:26