Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 403 from the begining #199

Closed
khru opened this issue Dec 9, 2015 · 5 comments
Closed

Error 403 from the begining #199

khru opened this issue Dec 9, 2015 · 5 comments

Comments

@khru
Copy link

khru commented Dec 9, 2015

I've just install mini, and it happens that some how when I access 192.168.33.44 apache shows a 403 forbbiden message.

This is my site configuration:

<VirtualHost *:80>
    DocumentRoot "/var/www/html/myproject/public"
    <Directory "/var/www/html/myproject/public">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

The rewrite mod is enabled.

If I disabled the site, I can access to the server but not to the myproject folder.

@panique
Copy link
Owner

panique commented Dec 9, 2015

Have you used the auto-installer ? and please give some details on your OS etc

@khru
Copy link
Author

khru commented Dec 9, 2015

I've used Vagrant 100% autoinstaller, and my OS is Ubuntu 14.04 x64.

I've also have tried to replace from .htaccess -"Indexes" to "+Indexes"

@khru
Copy link
Author

khru commented Dec 9, 2015

I think I see the problem:

drwx------  1 vagrant vagrant 4096 Dec  9 11:04 html
drwxrwxr-x 1 vagrant vagrant  4096 Dec  9 11:05 myproject

I believed that the owner must be www-data

So i tried this:

  # Share an additional folder to the guest VM. The first argument is the path on the host to the actual folder.
  # The second argument is the path on the guest to mount the folder.
  config.vm.synced_folder "./", "/var/www/html",
  owner: "www-data",
  group: "www-data",
  mount_options: ["dmode=775,fmode=775"]

and I fix it

@khru
Copy link
Author

khru commented Dec 11, 2015

Becuse i've changed the permissions composer doesn't work...

@panique
Copy link
Owner

panique commented Dec 12, 2015

Hey, thanks for the feedback!

I think you are right, this was also a problem in another project that used nearly the same auto-installer, and there's I've fixed it by replacing

# create project folder
sudo mkdir "/var/www/html/${PROJECTFOLDER}"

with

# Create project folder, written in 3 single mkdir-statements to make sure this runs everywhere without problems
sudo mkdir "/var/www"
sudo mkdir "/var/www/html"
sudo mkdir "/var/www/html/${PROJECTFOLDER}"

I cannot explain exactly why and how this works better, but it does in lots of installation of HUGE (https://github.com/panique/huge/blob/master/_one-click-installation/bootstrap.sh), therefore it should be the same for MINI.

I've changed this now in develop and master branch inside this project here, please gimme some time for testting ! :)

panique added a commit that referenced this issue Dec 12, 2015
panique added a commit that referenced this issue Dec 12, 2015
better mkdir to prevent problems (issue #199)
@panique panique closed this as completed Jul 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants