access forbidden (403) for localhost/adminer with apache
By trying to get adminer running under archlinux, I got into this problem.
When setting up apache for adminer and calling localhost/adminer either with firefox or opera, I receive code 403 (access forbidden).
When starting adminer without apache via:
php -S localhost:8000 -t /usr/share/webapps/adminer/
calling localhost/adminer with firefox works.
All folders in the path to the index.php file have read and execute permissions. There is only one single file with read permission "index.php" present. The same accounts for my ServerRoot "/srv/http/" except that there is not a single file in there.
There must be a mistake in my apache config files.
The relevant parts of my apache config files are:
/etc/httpd/conf/httpd.conf:
ServerRoot "/etc/httpd"
Listen 80
...
User http
Group http
ServerAdmin you@example.com
ServerName localhost:80
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/srv/http"
<Directory "/srv/http">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
...
Include conf/extra/httpd-adminer.conf
...
/etc/httpd/conf/extra/httpd-adminer.conf:
# vim: ft=apache
Alias /adminer "/usr/share/webapps/adminer"
<Directory "/usr/share/webapps/adminer">
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>
I tryed to use a symlink without the Alias-line in "http-adminer.conf" without success.
Yes, I made sure to restart the apache sever. (And the server is running, otherwise the code would 404 and not 403.)
What am I doing wrong?
arch-linux apache-httpd php
add a comment |
By trying to get adminer running under archlinux, I got into this problem.
When setting up apache for adminer and calling localhost/adminer either with firefox or opera, I receive code 403 (access forbidden).
When starting adminer without apache via:
php -S localhost:8000 -t /usr/share/webapps/adminer/
calling localhost/adminer with firefox works.
All folders in the path to the index.php file have read and execute permissions. There is only one single file with read permission "index.php" present. The same accounts for my ServerRoot "/srv/http/" except that there is not a single file in there.
There must be a mistake in my apache config files.
The relevant parts of my apache config files are:
/etc/httpd/conf/httpd.conf:
ServerRoot "/etc/httpd"
Listen 80
...
User http
Group http
ServerAdmin you@example.com
ServerName localhost:80
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/srv/http"
<Directory "/srv/http">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
...
Include conf/extra/httpd-adminer.conf
...
/etc/httpd/conf/extra/httpd-adminer.conf:
# vim: ft=apache
Alias /adminer "/usr/share/webapps/adminer"
<Directory "/usr/share/webapps/adminer">
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>
I tryed to use a symlink without the Alias-line in "http-adminer.conf" without success.
Yes, I made sure to restart the apache sever. (And the server is running, otherwise the code would 404 and not 403.)
What am I doing wrong?
arch-linux apache-httpd php
Do you have a server onlocalhost:8000
? You can use reverse proxy for this service via apache. (serverfault.com/questions/948824/…) is a reverse proxy example for you.
– jefferyear
1 hour ago
add a comment |
By trying to get adminer running under archlinux, I got into this problem.
When setting up apache for adminer and calling localhost/adminer either with firefox or opera, I receive code 403 (access forbidden).
When starting adminer without apache via:
php -S localhost:8000 -t /usr/share/webapps/adminer/
calling localhost/adminer with firefox works.
All folders in the path to the index.php file have read and execute permissions. There is only one single file with read permission "index.php" present. The same accounts for my ServerRoot "/srv/http/" except that there is not a single file in there.
There must be a mistake in my apache config files.
The relevant parts of my apache config files are:
/etc/httpd/conf/httpd.conf:
ServerRoot "/etc/httpd"
Listen 80
...
User http
Group http
ServerAdmin you@example.com
ServerName localhost:80
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/srv/http"
<Directory "/srv/http">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
...
Include conf/extra/httpd-adminer.conf
...
/etc/httpd/conf/extra/httpd-adminer.conf:
# vim: ft=apache
Alias /adminer "/usr/share/webapps/adminer"
<Directory "/usr/share/webapps/adminer">
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>
I tryed to use a symlink without the Alias-line in "http-adminer.conf" without success.
Yes, I made sure to restart the apache sever. (And the server is running, otherwise the code would 404 and not 403.)
What am I doing wrong?
arch-linux apache-httpd php
By trying to get adminer running under archlinux, I got into this problem.
When setting up apache for adminer and calling localhost/adminer either with firefox or opera, I receive code 403 (access forbidden).
When starting adminer without apache via:
php -S localhost:8000 -t /usr/share/webapps/adminer/
calling localhost/adminer with firefox works.
All folders in the path to the index.php file have read and execute permissions. There is only one single file with read permission "index.php" present. The same accounts for my ServerRoot "/srv/http/" except that there is not a single file in there.
There must be a mistake in my apache config files.
The relevant parts of my apache config files are:
/etc/httpd/conf/httpd.conf:
ServerRoot "/etc/httpd"
Listen 80
...
User http
Group http
ServerAdmin you@example.com
ServerName localhost:80
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/srv/http"
<Directory "/srv/http">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
...
Include conf/extra/httpd-adminer.conf
...
/etc/httpd/conf/extra/httpd-adminer.conf:
# vim: ft=apache
Alias /adminer "/usr/share/webapps/adminer"
<Directory "/usr/share/webapps/adminer">
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>
I tryed to use a symlink without the Alias-line in "http-adminer.conf" without success.
Yes, I made sure to restart the apache sever. (And the server is running, otherwise the code would 404 and not 403.)
What am I doing wrong?
arch-linux apache-httpd php
arch-linux apache-httpd php
edited 3 hours ago
Rui F Ribeiro
39.5k1479132
39.5k1479132
asked 3 hours ago
bejobejo
284
284
Do you have a server onlocalhost:8000
? You can use reverse proxy for this service via apache. (serverfault.com/questions/948824/…) is a reverse proxy example for you.
– jefferyear
1 hour ago
add a comment |
Do you have a server onlocalhost:8000
? You can use reverse proxy for this service via apache. (serverfault.com/questions/948824/…) is a reverse proxy example for you.
– jefferyear
1 hour ago
Do you have a server on
localhost:8000
? You can use reverse proxy for this service via apache. (serverfault.com/questions/948824/…) is a reverse proxy example for you.– jefferyear
1 hour ago
Do you have a server on
localhost:8000
? You can use reverse proxy for this service via apache. (serverfault.com/questions/948824/…) is a reverse proxy example for you.– jefferyear
1 hour ago
add a comment |
1 Answer
1
active
oldest
votes
If you are just serving adminer from that web server, change the root that Apache serves pages from as in:
DocumentRoot "/usr/share/webapps/adminer"
And then restart the Apache service.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f494509%2faccess-forbidden-403-for-localhost-adminer-with-apache%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you are just serving adminer from that web server, change the root that Apache serves pages from as in:
DocumentRoot "/usr/share/webapps/adminer"
And then restart the Apache service.
add a comment |
If you are just serving adminer from that web server, change the root that Apache serves pages from as in:
DocumentRoot "/usr/share/webapps/adminer"
And then restart the Apache service.
add a comment |
If you are just serving adminer from that web server, change the root that Apache serves pages from as in:
DocumentRoot "/usr/share/webapps/adminer"
And then restart the Apache service.
If you are just serving adminer from that web server, change the root that Apache serves pages from as in:
DocumentRoot "/usr/share/webapps/adminer"
And then restart the Apache service.
answered 2 hours ago
Rui F RibeiroRui F Ribeiro
39.5k1479132
39.5k1479132
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f494509%2faccess-forbidden-403-for-localhost-adminer-with-apache%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do you have a server on
localhost:8000
? You can use reverse proxy for this service via apache. (serverfault.com/questions/948824/…) is a reverse proxy example for you.– jefferyear
1 hour ago