What's new
Carbonite

South Africa's Top Online Tech Classifieds!
Register a free account today to become a member! (No Under 18's)
Home of C.U.D.

Permission Denied

Bird87_ZA

Official Title Holder of Smallest Penis on Forum
Rating - 100%
22   0   0
Joined
Jan 13, 2016
Messages
695
Reaction score
309
Points
3,635
Age
36
Location
Düsseldorf, DE
Let me start of by saying, I have very limited server setup experience.

I decided I want to play around with PHP7.3 RC 6 a bit before it's release. So I set up a vagrant box with this:

Code:
Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.synced_folder "../", "/var/www",  owner: "apache", group: "apache"
  config.vm.network "private_network", ip: "192.168.56.102"
end

And I set up my hosts file like so:

Code:
192.168.56.102 p73.server.com

Very simple.

I then go about installing Apache 2.4, Mysql 5.6 (I know) and PHP 7.3 RC 6. All goes swimingly. In my /var/www folder I have a phpinfo.php file that just prints phpinfo. My permissions is 755 on the file, and my owner and group is apache. I confirm that httpd is running as apache.

I also add my vhost file:

Code:
<VirtualHost *:80>
  ServerName p73.server.com

  ## Vhost docroot
  DocumentRoot "/var/www/"

  ## Directories, there should at least be a declaration for /var/www/

  <Directory "/var/www/">
    Options Indexes FollowSymlinks MultiViews
    AllowOverride All
    Require all granted
  </Directory>

  <FilesMatch "\.php$">
    Require all granted
    SetHandler proxy:fcgi://127.0.0.1:9000
  </FilesMatch>

  ## Logging
  ErrorLog "/var/log/httpd/localserver_error.log"
  ServerSignature Off
  CustomLog "/var/log/httpd/localserver_access.log" combined
  SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

  ## Custom fragment

</VirtualHost>

Open up my browser and go to http://p73.server.com, and get a permission denied error. WHY!? I have no idea where to start looking... Can anybody help?
 
Hi.
Have not run Apache for a while, just Nginx, and there the "root" (Document Root) has to be set WITHOUT a trailing "/"
Directory directives must have the trailing "/" though (yours is correct there).
Also, not sure for apache2 but normally the "\.php$" would be "~\.php$" but I could be wrong.
Try it :)
 

Users who are viewing this thread

Back
Top Bottom