deda-ca / cgi-node

CGI Node.js complete module to replace PHP on shared hosting such as GoDaddy
http://www.cgi-node.org/
MIT License
172 stars 21 forks source link

404 on Apache Server #14

Open ghost opened 9 years ago

ghost commented 9 years ago

I'm getting the same 404 error as everybody else when trying to install CGI-node, and have followed every step on this forum I've found. I think it's an issue with the root path, could I send you my login details and you have a look at it, see what you think? It's driving me crazy :)

jeronimonunes commented 6 years ago

Some extra steps I had to take was to AllowOverride (for the .htaccess to work) as in my /etc/apache2/sites-enabled/000-default.conf:

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf

        <Directory "/var/www/html">
                AllowOverride All
        </Directory>

</VirtualHost>

To also enable the cgi mode and the actions mode as in:

$ sudo a2enmod cgi
$ sudo a2enmod actions

To change the path of sessions and the node runnable on the cgi-node.js, to change the permissions of the sessions folder so the apache user could write in it and to make sure the node is own by root.

You could try these steps too, I guess to close the issue the doc should be updated to include more info.