Local emoncms installation - apache configuration "permission denied"

I’m trying to install a local version of emoncms on my Synology NAS in an Ubuntu 16.04 VM. I’m following the guide emoncms/LinuxInstall.md at master · emoncms/emoncms · GitHub , but I’m having trouble configuring Apache.

When running the command:

sudo cat <<EOF >> /etc/apache2/sites-available/emoncms.conf
<Directory /var/www/html/emoncms>
    Options FollowSymLinks
    AllowOverride All
    DirectoryIndex index.php
    Order allow,deny
    Allow from all
</Directory>
EOF

I get “bash: etc/apache2/…/emoncms.conf: Permission denied”

Being a real Linux noob, sorry!, I’m assuming I’m trying to create the emoncms.conf file. Please advise how to proceed, can I just manually create the emoncms.conf file?

Thank you in advance :slight_smile:

Solved the apache issue by granting myself superuser privileges. Thought sudo was enough.

Having finished the install I’m having trouble logging into emoncms: "Can’t login to database, please verify credentials/configuration in settings.php Error message: Access denied for user '[email protected]‘localhost’ (Using password: YES)

Think I have configured settings OK, i.e. mysql user and password…

1 Like

I tried the same command and got the same error. So I tried this and it seemed to work OK:

sudo bash
sudo cat <<EOF >> /etc/apache2/sites-available/emoncms.conf
<Directory /var/www/html/emoncms>
    Options FollowSymLinks
    AllowOverride All
    DirectoryIndex index.php
    Order allow,deny
    Allow from all
</Directory>
EOF

Then you type Control-D to exit the root user and get back to your original user.

Yes, it could do it manually.

sudo bash
nano /etc/apache2/sites-available/emoncms.conf

then paste into nano:

<Directory /var/www/html/emoncms>
    Options FollowSymLinks
    AllowOverride All
    DirectoryIndex index.php
    Order allow,deny
    Allow from all
</Directory>

then type Control-X, then Y, then enter.

glad you the emoncms.conf working!

This one I do not know… :worried: sorry!

Thanks Jon.

Did a fresh install and I’m now getting all the way to the emoncms login screen. Think I put in the wrong user in MYSQL. Next problem seem to be creating an emoncms user: ‘Error creating user’. Not sure if this has to do with privileges.

Seems my problem has already been addressed ( Emoncms "Error creating user" ). Did a fresh install, pulled the “master” branch on install and the local emoncms loads and run as intended.

@TrystanLea or @glyn.hudson can these changes please get merged into the stable branch? It’s been over 3mths since the last stable release and there seems to be quite a few changes queued.

Good idea, done :+1:

@glyn.hudson @TrystanLea and an announcement please pinned on the forum so everyone will see this.