Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Setup local webserver

  1. #11
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Setup local webserver

    Quote Originally Posted by ELD View Post
    That's what the article said to do

    I have a question though, how can i set the folder it's using to one in my documents area?
    You can enable the apache2 default $HOME/public_html directory using

    Code:
    sudo a2enmod userdir
    and restarting the apache2 service - if you want to enable php scripts in $HOME/public_html there's an extra step involving your /etc/apache2/mods-available/php5.conf file - open the file and follow the instructions:

    Code:
        # To re-enable php in user directories comment the following lines
        # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
        # prevents .htaccess files from disabling it.
        <IfModule mod_userdir.c>
            <Directory /home/*/public_html>
                php_admin_value engine Off
            </Directory>
        </IfModule>
    Last edited by steeldriver; March 17th, 2013 at 06:30 PM.

  2. #12
    Join Date
    Jun 2005
    Location
    England
    Beans
    2,726

    Re: Setup local webserver

    Hmm since doing this:
    sudo a2enmod userdir
    I can no longer start apache?

    This is in the log file:
    [Sun Mar 17 16:40:41 2013] [notice] Apache/2.2.22 (Ubuntu) configured -- resuming normal operations
    [Sun Mar 17 16:40:42 2013] [notice] caught SIGTERM, shutting down
    [Sun Mar 17 16:40:43 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.6-1ubuntu1.2 configured -- resuming normal operations
    [Sun Mar 17 16:41:38 2013] [notice] Graceful restart requested, doing restart
    [Sun Mar 17 16:41:38 2013] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    [Sun Mar 17 16:41:38 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.6-1ubuntu1.2 configured -- resuming normal operations
    [Sun Mar 17 16:41:47 2013] [notice] Graceful restart requested, doing restart
    [Sun Mar 17 16:41:47 2013] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    [Sun Mar 17 16:41:47 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.6-1ubuntu1.2 configured -- resuming normal operations
    [Sun Mar 17 16:42:25 2013] [notice] Graceful restart requested, doing restart
    [Sun Mar 17 16:42:25 2013] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    [Sun Mar 17 16:42:25 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.6-1ubuntu1.2 configured -- resuming normal operations
    [Sun Mar 17 16:42:36 2013] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
    [Sun Mar 17 16:42:36 2013] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
    [Sun Mar 17 16:46:35 2013] [notice] SIGHUP received. Attempting to restart
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    (98)Address already in use: make_sock: could not bind to address 127.0.0.1:80
    no listening sockets available, shutting down
    Unable to open logs

  3. #13
    Join Date
    Jun 2005
    Location
    England
    Beans
    2,726

    Re: Setup local webserver

    BUMP, still need help with this

  4. #14
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Setup local webserver

    are you sure the service really stopped?

    Code:
    service apache2 status
    did you look to see what's bound to port 80?

    Code:
    sudo netstat -nlp | grep :80

  5. #15
    Join Date
    Jun 2005
    Location
    England
    Beans
    2,726

    Re: Setup local webserver

    liam@liam-ubuntu:~$ service apache2 status
    Apache2 is NOT running.


    liam@liam-ubuntu:~$ sudo netstat -nlp | grep :80
    [sudo] password for liam:
    then nothing appears

    Does that help?

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •