First, I looked on this page [Apache localhost 403 error with Yosemite because the person seems to have the same problem as me. I tried differents things but its doesn't work for me. When I write localhost in my url I receive a 403 Forbidden "You don't have permission to access / on this server". Sorry, I'm an beginner. I don't really know what kind of informations that you need to know to help me to fix that.
My directory /Users/schan/Sites/
My user.conf (schan.conf) is
<Directory "/Users/schan/Sites/">
Options Indexes MultiViews
AllowOverride All
Require all granted
</Directory>
My httpd.conf (some informations tell me if you need more)
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Users/schan/Sites"
<Directory "/Users/schan/Sites">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options FollowSymLinks Multiviews
MultiviewsMatch Any
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
If you write 'localhost' in your url, the following directory is called on yosemite: /Library/WebServer/Documents/
which is not the same as /Users/schan/Sites
you would call /Users/schan/Sites using:
http://localhost/~schan
Getting a 403 on 'localhost' on my Yosemite happens, if i drop the read-permission from the Documents Folder, it should be 644 or, in Finder Info it would say
System read and write
wheel read only
everyone read only
For setting up the local user, i found this link the most helpful and complete: http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-10-yosemite/
Related
I'm running httpd on fedora server 35 and want to use it to serve files on my local network. It works fine for files stored under the /var/www/html directory directly (e.g. /var/www/html/videos/video.mp4 can be accessed with http://IP/videos/video.mp4 on any local device).
I want to serve files stored in other locations in the file system. My plan was to create symbolic links to those locations. When I do that, I run into forbidden errors when trying to access the files (e.g. A video file /files/videos/video.mp4 linked with a sym link /var/www/html/videos-link -> /files/videos/ so that I would (theoretically) access it with http://IP/videos-link/video.mp4
I can navigate to http://IP/videos-link fine (an Index of DIRECTORY page, but no files are listed), but trying to access the file (http://IP/videos-link/video.mp4) gives me 403 forbidden.
My config (/etc/httpd/conf/httpd.conf) looks like this (it's a bit messy since I've been trying to fix this myself):
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
Require all granted
</Directory>
...
<Directory "/var/www">
Options +FollowSymLinks +Indexes
AllowOverride All
Require all granted
</Directory>
...
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
...
<Directory "/files/videos">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
In attempts to make it work I've made sure the sym link and all the directories have the same owner and that their all 777 so ownership/read perms shouldn't be an issue. Would greatly appreciate some help, thanks.
My issue was with SELinux. To get it working immediately I was able to set SELinux to permissive mode with
# setenforce 0
That refreshes on boot and is probably insecure, so the permanent fix (to just let httpd through) would be:
# semanage permissive -a httpd_t
More details on SELinux in Fedora can be found here: https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-selinux/
I've installed a application on my RHEL 7.x server. During a installation wizard which I reach over a common browser, the application will test some components of the installation. During this "system-checks" I get the error message test on .htaccess file failed.
In the httpd.conf are the permission set :
<Directory "/var/www/html/>
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
What confuses me a bit is that the .htaccess file is lost after a restart of httpd. service it always disappears, so it is no longer visible.
Server version: Apache/2.4.6 (Red Hat Enterprise Linux)
Also the Selinux permissions and the permissions inside /var/www/html are correct. I don't know more, please let me know if you need more information.
Best regards,
Nico
I need to access my wamp for a moment thru my global IP address. But I can't. I'm using the latest WAMP 2.5 for 32-bit.
It has worked before when I've had earlier versions of wamp. Just go to tray icon > Put Online and voila. Seems like they changed something.
Even if I put it online I cant access it. It says wamp is online.
I don't get any "access denied" which you used in earlier versions of wamp, it just keeps loading until timeout and then I get browser can't reach website error message. "This website is not available" google chrome.
I have DMZ set up on the comp so the ports are not a problem.
In httpd.conf I found this (this is default):
<Directory "c:/wamp/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Require all granted
</Directory>
Any ideas?
I use Easyphp for my development environment on my Windows PC and Laptop. For some odd reason I am unable to get aliasing to work on my laptop. I get an error:
Object not found!
I think it is a problem with Apache, but I am unsure. It is probably something dead simple, but I have spent way to many hours trying to work it out for myself. I have tried to manually write the alias and I have tried reinstalling easyphp, but I can't get it to work. Could the default virtual host be interfering with the alias?
Here is what is at the bottom of the httpd.conf file:
# == !!! DO NOT REMOVE !!! ===================================================
### Alias EasyPHP
# ============================================================================
#alias
Alias "/development" "C:/Users/Sam/dev"
<Directory "C:/Users/Sam/dev">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
Allow from 127.0.0.1
Deny from all
Require all granted
</Directory>
#alias
# ============================================================================
### Alias End
# ============================================================================
# == !!! DO NOT REMOVE !!! ===================================================
### VirtualHost EasyPHP
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
DocumentRoot "C:/Program Files (x86)/EasyPHP-12.1/www"
ServerName localhost
</VirtualHost>
# ============================================================================
#virtualhost
#virtualhost
# ============================================================================
### VirtualHost End
# ============================================================================
#Sam: I'm no guru, but have just solved this for myself and thought I'd share my experience. I have happily used EasyPHP 12.1 for several weeks, adding and deleting aliases through testing various WordPress setups. Suddenly, aliases I added threw up the "Object not found" error, no matter how I addressed them. I checked my httpd.conf file and found the recently added aliases were not present (?). Manually adding the ones I needed (and deleting the obsolete ones) solved it for me.
Note: my httpd.conf file ends with my last alias, and not with a "virtualhost" entry:
...
Alias "/mangala" "C:/_localwebs/mangala"
<Directory "C:/_localwebs/mangala">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
Allow from 127.0.0.1
Deny from all
Require all granted
</Directory>
Alias "/zenphoto" "C:/_localwebs/zenphoto"
<Directory "C:/_localwebs/zenphoto">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
Allow from 127.0.0.1
Deny from all
Require all granted
</Directory>
#alias
# ========================
# ========================
Hope you've either sorted it already, or this helps.
You should check to see if you have Apache and mysql started as a service, becuase I had this problem and Apache being started as a service is what was the problem for me.
Is it possible to access phpmyadmin from outside the network?
Where do I set it? I tried editing httpd.conf, and restarted all services from wampserver but it doesn't work
<Directory />
Options FollowSymLinks
AllowOverride None
Order Allow,Deny
Allow from all
</Directory>
Go to C:\wamp\alias and edit the file phpmyadmin
# to give access to phpmyadmin from outside
# replace the lines
#
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#
# by
#
# Order Allow,Deny
# Allow from all
# Edit C:\wamp\alias\phpmyadmin.conf
# Below is v3.5.1 - the current version is 4.0.4.1
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin3.5.1/"
# to give access to phpMyAdmin from outside
# replace the lines
#
# Require local
#
# by
#
# Require all granted
#
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all granted
</Directory>
Are you on Unix or Windows? If on Unix, check the owner/permissions for the directory that phpMyAdmin is installed under - that might have something to do with it.
It looks to me as if you're trying to access a private address from a remote network. You can't. You will have to configure a webserver on your machine and use a ddns (in case you don't have a fixed public ip) service on your server. You will probablly have to redirect port 80 incoming traffic on your router pointing to the webserver machine also.
just for reference of other users who will encounter this kind of issue I would like to remind everyone that aside from changing directories, you must also have to check your firewall settings.
It happened to me, I've changed everything (all config in xampp) but still cannot connect. I almost gave up and then I remembered firewall. After I changed my settings it all works fine.
just sharing
Did you try like this ? Maybe you shuld add directory name in your network ?
<Directory "/Documents and Settings/All Users/Documents/xampp/phpMyAdmin">
...
...
...
...
</Directory>
Put below code in file
D:\wamp\alias\phpmyadmin.conf
< Directory "D:/wamp/apps/phpmyadmin3.2.0.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Allow from 127.0.0.1
< /Directory>