Just reloaded my main computer, put on Windows 8.1 (used to have 7). This is my primary development computer at home. Traditionally I just installed a WAMP server manually and was off to the races.

This time though I'm trying something different. Everything (or most) will be kept on my computer but I will be using a VM with Ubuntu Server installed to facilitate the AMP part. Currently I have everything going as I want: SSH is set up, Apache is installed via apt-get, I have my Windows share mounted in /media/web with the correct credentials, etc.

My issue is I am running into a 403 forbidden error when trying to access the page in the browser, via the VM's IP address, which I know is correct since I tested it when Apache was first installed. I found this article on Stack Overflow, but being a Linux noob I am not quite sure what is meant by "...and created a symbolic link". I have added the umask property or whatever its called and everything is mounted under my user name so I have permissions. I also added the <directory> stuff that's mentioned in the other answer to my /etc/apache2/sites-available/000-default.conf file. I am assuming I am just missing that last piece of the puzzle to have this working, then I can move onto setting up PHP and MariaDB.

My understanding of symbolic links is they are similar to shortcuts in Windows. Kinda. But in any case I am not sure what is being made into the link and what to do with it after.

And yes, I have been running sudo service apache2 restart when making changes. :p

Thanks in advance!

    How are you mounting? Through virtual box shared folders or something like a samba?

    If through VB shared folders, then make sure that the user apache is running under (daemon for me) is part of the vboxsf group. Below is the command I used to add daemon to the vboxsf group, I then restarted the whole vm and things worked.

    sudo usermod -a -G vboxsf daemon
    

      Thanks for the reply Dero!

      I'm mounting it via cifs in /etc/fstab:

      //192.168.0.199/web /media/web cifs credentials=/home/brent/.web_credentials,iocharset=utf8,sec=ntlm,uid=1000,gid=1000 0 0
      

      (Just remembered that the umask wasn't working but I had to add the uid and gid)

        I managed to get this to work. Again, my lack of experience is to blame.

        (I am trying to remember this off the top of my head since I am at work and not at home)

        So I knew there was an apache.conf file in /etc/apache2, but it didn't look like it had what I was looking for, so I was making changes to /etc/apache2/sites-available/000-default.conf (or whatever its exact name is). But what I didn't realize was that apache.conf file was the "parent" .conf file and it was pulling in the others, and when I reviewed it more carefully, it had designations about folders, so I had to comment out the one that was empty (since I believe it was deny all) and add the <Directory> entry for the share. And then it worked.

        PHP is working correctly now as well (7.0.2) and I have even set up the log files to write to a specific folder on the share. The final piece of the puzzle is setting up MariaDB to store the database info on my host and then I should be good to go!

          Write a Reply...