Xampp 403 ошибка linux

Arch Linux

You are not logged in.

#1 2012-09-01 23:25:53

[SOLVED] XAMPP 1.8.0 + virtual hosts = 403 access forbidden

Hello, all. I am happy migrant from ubuntu to arch, but have problem, which i can’t solve myself.
I need to setup xammp for local development.

My actions

Install last xampp from aur

Open locahost, there is «xampp welcome page»

Open localhost/phpmyadmin and get

xampp new xampp security concept, blablabla

Okay, add «Require all granted» in httpd-xampp.conf

AllowOverride AuthConfig Limit
#Order allow,deny
#Allow from all
Require all granted

phpmyadmin came back

I need virtual hosts, structure will be

Uncomment include vhosts in httpd.conf

Clear httpd-vhosts.conf and put there

DocumentRoot «/home/shara/Sites/mysite»
ServerName mysite
ServerAlias www.mysite
ErrorLog «/home/shara/Sites/mysite-error_log»
CustomLog «/home/shara/Sites/mysite-access_log» common

Add new host in /etc/hosts

Set «User shara» and «Group www» in httpd.conf

User shara
# commented out by lampp compatibility check
#Group nogroup
Group www

Add group «groupadd www»

Add user to group «usermod -aG www shara»

Change htdocs group «chgrp -R www /opt/lampp/htdocs»

Change sitedir group «chgrp -R www /home/shara/Sites»

Change htdocs chmod «chmod 2775 /opt/lampp/htdocs»

Change sitedir chmod «chmod 2775 /home/shara/Sites»

Run xampp

Access forbidden Error 403

Access forbidden Error 403

Existing configuration file (./config.inc.php) is not readable.

Oookay
Set chmod 664 to /opt/lampp/phpmyadmin/config.inc.php

Open «localhost/phpmyadmin»
phpmyadmin works, but nothing else

XAMPP 1.7 worked perfect with this config. Where is the FAIL?

Last edited by Shara (2012-09-04 12:18:48)

#2 2012-09-04 12:18:56

Re: [SOLVED] XAMPP 1.8.0 + virtual hosts = 403 access forbidden

I did it.
phpmyadmin new security problem solved with set passwords with /opt/lampp/lampp security (NO require all granted in httpd-xampp.conf)
virtual hosts 403 problem solved with

New instruction:
*User name «shara» and group «www» is myown, you need to set yours

INSTALL

/opt/lampp/lampp security

VIRTUAL HOSTS

Uncomment including vhosts in «/opt/lampp/etc/httpd.conf» and set «User shara» and «Group www»

User shara
# commented out by lampp compatibility check
#Group nogroup
Group www

Clear «/opt/lampp/etc/extra/httpd-vhosts.conf» and add

DocumentRoot «/home/shara/Sites/mysite»
ServerName mysite
ErrorLog «/home/shara/Sites/mysite/mysite-error.log»
CustomLog «/home/shara/Sites/mysite/mysite-access.log» common

Require all granted

Add new host in /etc/hosts

Add user to group

usermod -aG www shara

Change htdocs group

chgrp -R www /opt/lampp/htdocs

Change sitedir group

chgrp -R www /home/shara/Sites

Change htdocs chmod

chmod 2775 /opt/lampp/htdocs

Change sitedir chmod

chmod 2775 /home/shara/Sites

Set phpmyadmin config chmod

chmod 664 /opt/lampp/phpmyadmin/config.inc.php

sudo /opt/lampp/lampp start

WIN ^_^

May i need to write archwiki manual?

Last edited by Shara (2013-02-28 17:07:22)

#3 2013-02-28 16:48:49

Re: [SOLVED] XAMPP 1.8.0 + virtual hosts = 403 access forbidden

This just saved me from a lot of frustration. Thank you.

Читайте также:  Installing windows games on linux

#4 2013-02-28 17:41:11

Re: [SOLVED] XAMPP 1.8.0 + virtual hosts = 403 access forbidden

I got a notification by email that this post got new comment and found one mistake.
It’s about «httpd-vhosts.conf». it’s will be good to put log files to site directory like this:

ErrorLog «/home/shara/Sites/mysite/mysite-error.log»

And if you want — here is my small bash script made for toggling xampp and generate virtual hosts from directories with one click. Like with «denwer».

Of course don’t forget to change location variables!
And maybe you need (or don’t need) notify-send utility, which i use for start/stop notification

If you want to start xampp without sudo password you need add permisssion in sudoers

Edit sudoers with nano text editor

sudo EDITOR=nano visudo

And add line in «User privilege specification» section
Set your username and path to script (I put it to /usr/local/sbin)

shara ALL=NOPASSWD: /usr/local/sbin/togglexampp

You should make it like this

Okay, now you can start/stop xampp without password with command

Источник

Доступ к запрашиваемому объекту доступен только из локальной сети phpmyadmin

Я только что установил xampp 1.8.0 для linux, и когда я открыл phpmyadmin, я получил эту ошибку Доступ Запрещен!!

пробовал этой пост, но не повезло. пожалуйста помочь. Я открываю его с моего собственного ПК, а не из какой-либо другой сети.

7 ответов

откройте http.файл conf

комментарии «отрицать от всех» в следующем разделе

Edit:
Попробуйте добавить «Allow from all» перед строкой «ErrorDocument». Надеюсь, это поможет.

добавление к ответу Sekar

Не забудьте перезагрузить сервер XAMPP

обновить принятый ответ:

теперь вам нужно прокомментировать требование local

если ниже вы видите сообщение об ошибке, при попытке в phpyAdmin :

вы можете сделать следующее (Для XAMPP, развернутого в UNIX-системе): Вы можете попробовать изменить настройки

и измените настройки безопасности на

First-comment PL module, second-change config для каталога узлов. После этого вы должны перезапустить httpd демон

ничего не работало для меня, но вот что было удивительным:

который находится на

3) Теперь просто добавьте требовать все предоставленные до

4) таким образом, код будет выглядеть следующим образом
AllowOverride AuthConfig Limit Order allow,deny Allow from all Require all granted

5) Теперь, наконец, перезапустите xampp с помощью этой команды /opt/lampp/lampp перезапустить

вот и все, и вы сделали!

Он также работает с xampp. 🙂

Эй, используйте этот раздел кода.

путь для xampp: apache\conf\extra\httpd-xampp.conf

после установки «Allow from all» вам нужно перезапустить xampp, чтобы применить настройку. спасибо

На XAMPP 5.6.3 Windows Путь C:\xampp\apache\conf\extra\httpd-xampp — . conf комментарий в этом: #Require local

новая концепция безопасности XAMPP . #Требуют .

Источник

How to Troubleshoot Error 403 in XAMPP

If you’re using the XAMPP local development environment to run a WordPress website, you may run into issues from time to time. One of the most common problems you might encounter while trying to access your database is “error 403”, also known as the “XAMPP access forbidden error”.

In a nutshell, XAMPP error 403 means you don’t have the necessary permissions to access or edit the database. In this article, we’ll talk about what XAMPP is, why this error shows up, and how to fix it on both Windows and macOS devices. Let’s get to it!

An Introduction to XAMPP

XAMPP is a local development environment. By installing XAMPP, you’re also setting up all the software you need to host and run local WordPress websites.

Читайте также:  Windows 10 bsod 2004

The XAMPP home page.

As you might know, WordPress has several system requirements, and XAMPP meets all of them. The software stack that you can install on your computer using XAMPP includes:

  • Apache: This the server software that enables you to host and serve websites on your computer.
  • MariaDB: This is the database software that provides WordPress somewhere to save information, so it can be accessed again as needed.
  • PHP: WordPress is built on top of the PHP programming language, so it’s essential to set up the software on your server.
  • Perl: Although WordPress doesn’t use the Perl programming language, it comes as part of the software stack that XAMPP configures for you.

You’ve probably run into an error 403 at some point while browsing the web. The error code means that you don’t have the necessary permissions to access a specific file or page:

A regular error 403 message from Google Chrome.

However, in the context of using XAMPP to run a local WordPress website, error 403 has a different meaning. If you see a message that says “Access forbidden!“, it usually has to do with the XAMPP database.

An Overview of XAMPP Error 403

Typically, XAMPP error 403 appears when you try to access your local database through the browser. In normal circumstances, you can do that by going to the http://localhost/phpmyadmin address using any web browser:

A phpMyAdmin control panel.

If you don’t have the necessary permissions to access the database, you’ll run into error 403, which reads:

“New XAMPP security concept: Access to the requested directory is only available from the local network. This setting can be configured in the file httpd-xampp.conf.”

As far as error messages go, this one is fairly informative, as it tells you precisely what you need to do to solve the problem. However, before we start troubleshooting, it’s important to note that error 403 usually occurs when there are conflicting port configurations within XAMPP.

Often, the easiest way to bypass the issue is to do as the error message says. In this case, that’s to modify the httpd-xampp.conf file.

Looking for a free and powerful local WordPress development tool? DevKinsta features quick and easy site creation, email and database management tools, one-click PHP version switching, and full integration with MyKinsta. Get started with DevKinsta today, even if you’re not a Kinsta customer.

How to Troubleshoot XAMPP Error 403 (in Windows and macOS)

XAMPP is available for Windows, macOS, and Linux. In the sections below, we’ll show you how to troubleshoot XAMPP error 403 in both Windows and macOS. If you’re using a Linux distribution, you can follow the macOS instructions.

Sign Up For the Newsletter

Want to know how we increased our traffic over 1000%?

Join 20,000+ others who get our weekly newsletter with insider WordPress tips!

How to Troubleshoot XAMPP Error 403 in Windows

To get started, go ahead and launch XAMPP, and then start all of the services that your website uses. If you’re running a WordPress website, that would be Apache and MySQL.

Читайте также:  Не устанавливается windows с мультизагрузочной флешки

The XAMPP control panel.

Once both services are running, you can click on the Config button along the Apache row, and then select the Apache (httpd-xampp.conf) option:

Opening the httpd-xampp.conf file.

Now the httpd-xampp.conf file will open via your default text editor. With the file open, use the search feature to look for “phpMyAdmin”. You should see a snippet that looks like this:

The httpd-xampp.conf file.

Once you’ve located it, you can go ahead and delete the text that says “Require local” and replace it with “Require all granted”:

Modifying httpd-xampp.conf so it doesn’t block access to the database.

Save the changes to httpd-xampp.conf and close the file. Then you can restart both the Apache and MySQL services from the XAMPP control panel. Once the services are running again, you can try accessing your database once more by navigating to localhost/phpmyadmin in your browser.

How to Troubleshoot XAMPP Error 403 in macOS

Fixing XAMPP error 403 on macOS involves almost the same steps as it does for Windows devices. However, accessing the httpd-xampp.conf file is not precisely the same, since the XAMPP control panel looks a bit different:

XAMPP’s macOS control panel.

Despite the difference in style, accessing the file you need is still simple. Here are the five steps to follow:

  1. Go to the Volumes tab in the XAMPP control panel.
  2. Select the Mount option at the top of the screen.
  3. Click on the Explore button next to Mount once it becomes selectable.
  4. In the explorer window that pops up, navigate to etc/extra.
  5. Open the http-xampp.conf file.

Once the file is open, you can look for “phpmyadmin”within it. The snippet you see should look like this:

Next, you can replace the part that says “Require local” with “Require all granted”, and save the changes to the file. Now return to the XAMPP control panel, go to the “Services” tab, and click on Restart All. After all the XAMPP services are backed up, you should be able to access your database without problems.

Summary

Being able to access your website’s database is critical, whether you’re using a live server or a local development environment such as XAMPP. Although XAMPP error 403 can be annoying, it’s easy to solve whether you’re using Windows, macOS, or Linux.

All you have to do is edit the XAMPP httpd-xampp.conf file to ensure that everyone has access to phpMyAdmin. Then the 403 error should disappear right away.

If you want access to a local WordPress development environment that is easy to use and troubleshoot, we recommend giving DevKinsta a try. DevKinsta is available for free whether you’re a Kinsta user or not, and you can use it to set up many local WordPress websites as you need!

Save time, costs and maximize site performance with:

  • Instant help from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise integration.
  • Global audience reach with 28 data centers worldwide.
  • Optimization with our built-in Application Performance Monitoring.

All of that and much more, in one plan with no long-term contracts, assisted migrations, and a 30-day-money-back-guarantee. Check out our plans or talk to sales to find the plan that’s right for you.

Источник

Оцените статью