# Shopware 6 - Root Verzeichnis (ohne öffentlich sichtbares /public Verzeichnis) ändern

**URL:** <https://forum.shopware.com/t/shopware-6-root-verzeichnis-ohne-oeffentlich-sichtbares-public-verzeichnis-aendern/89895>\
**Category:** Installation / Einstieg\
**Created:** [21. August 2021 um 16:28 UTC](https://forum.shopware.com/t/shopware-6-root-verzeichnis-ohne-oeffentlich-sichtbares-public-verzeichnis-aendern/89895 "2021-08-21T16:28:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Humaniac](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/humaniac/32/14592_2.png) [@Humaniac](https://forum.shopware.com/u/Humaniac)\
**Post date:** [21. August 2021 um 16:28 UTC](https://forum.shopware.com/t/shopware-6-root-verzeichnis-ohne-oeffentlich-sichtbares-public-verzeichnis-aendern/89895/1 "2021-08-21T16:28:25Z")

</div>

Ich habe mit Hilfe eine DB- und Shop-Sicherung meinen Shop auf einen Host hochgeladen.  
Die Domain bleibt die gleiche und wurde entsprechend Nameserver auf den neuen Host verlinkt.  
Die .env-Datei habe ich entsprechend der Verzeichnisstruktur, dem DB- und Usernamen angepasst.

Jetzt wird mir folgendes seitens Shopware angezeigt:

If yes you are missing some important server configuration. For security reasons, all accessible files are located in the /public directory of your Shopware installation.

Please configure your web server to root your domain to the /public directory of this installation.

Die Frage meinerseits nun, wie setze ich die Umleitung über cPanel auf den /public Ordner, ohne das dieser im Browser angezeigt wird? Die komplette SW6 Installation liegt in public\_html . Die index Seite liegt in public\_html/public

---

<div class="post-metadata">

**Author:** ![SCOOPEX](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/scoopex/32/18328_2.png) [@SCOOPEX](https://forum.shopware.com/u/SCOOPEX)\
**Post date:** [21. August 2021 um 17:06 UTC](https://forum.shopware.com/t/shopware-6-root-verzeichnis-ohne-oeffentlich-sichtbares-public-verzeichnis-aendern/89895/2 "2021-08-21T17:06:54Z")

</div>

Hallo,

dazu findest Du online diverse Anleitungen:  
[https://www.google.de/search?q=cpanel+document+root+ändern](https://www.google.de/search?q=cpanel+document+root+%C3%A4ndern)

Viele Grüße

---

<div class="post-metadata">

**Author:** ![Humaniac](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/humaniac/32/14592_2.png) [@Humaniac](https://forum.shopware.com/u/Humaniac)\
**Post date:** [22. August 2021 um 11:13 UTC](https://forum.shopware.com/t/shopware-6-root-verzeichnis-ohne-oeffentlich-sichtbares-public-verzeichnis-aendern/89895/3 "2021-08-22T11:13:22Z")

</div>

Die Umleitung auf /public steht zwar, aber mir fehlt immer noch die richtige Erklärung dazu, wie ich es vor der Installation erreiche, dass die Domain ohne eben diesen Ordner /public im Browser des Users erscheint. Ich habe zwar [Shopware 6 - Erste Schritte - Installation](https://docs.shopware.com/de/shopware-6-de/erste-schritte/shopware-6-installieren?category=shopware-6-de/erste-schritte) gelesen, komme damit aber nicht klar. Der Punkt unter Routing Einstellungen (schwarzer Kasten mit Code) - wo nehme ich diese Einstellung vor bzw. wo trage ich diese ein?

---

<div class="post-metadata">

**Author:** ![SmartStylez](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@SmartStylez](https://forum.shopware.com/u/SmartStylez)\
**Post date:** [22. August 2021 um 11:30 UTC](https://forum.shopware.com/t/shopware-6-root-verzeichnis-ohne-oeffentlich-sichtbares-public-verzeichnis-aendern/89895/4 "2021-08-22T11:30:45Z")

</div>

Beim Webhoster kannst du eine Umleitung auf das Verzeichnis einrichten (lassen). Arbeitest du mit Plesk?

---

<div class="post-metadata">

**Author:** ![SCOOPEX](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/scoopex/32/18328_2.png) [@SCOOPEX](https://forum.shopware.com/u/SCOOPEX)\
**Post date:** [22. August 2021 um 12:03 UTC](https://forum.shopware.com/t/shopware-6-root-verzeichnis-ohne-oeffentlich-sichtbares-public-verzeichnis-aendern/89895/5 "2021-08-22T12:03:02Z")

</div>

Hallo,

Du musst die Einstellung in cPanel vornehmen, nicht in Shopware - so wie hier z.B. beschrieben:

> **[Change root directory for the main domain?](https://forums.cpanel.net/threads/change-root-directory-for-the-main-domain.592551/)**
>
> Here's my situation:
> 
> I need a URL shortener
> I like Polr best
> Polr requires changing root directory to wherever\_it\_is\_copied/public
> I can't find a way to change the root directory for the main domain
> My hosting plan doesn't allow add-on domains
> 
> So,...

Also z.B.  
documentroot: /home/USERNAME/public\_html

in

documentroot: /home/USERNAME/public\_html/public

ändern.

Die Shopware Daten kopierst Du nach /home/USERNAME/public\_html (nicht nach /home/USERNAME/public\_html/public).

So kannst Du dann die URL ohne /public aufrufen.

Viele Grüße

---

<div class="post-metadata">

**Author:** ![Humaniac](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/humaniac/32/14592_2.png) [@Humaniac](https://forum.shopware.com/u/Humaniac)\
**Post date:** [22. August 2021 um 13:36 UTC](https://forum.shopware.com/t/shopware-6-root-verzeichnis-ohne-oeffentlich-sichtbares-public-verzeichnis-aendern/89895/6 "2021-08-22T13:36:55Z")

</div>

Die Accounts sind allesamt über cPanel zu bedienen.

---

<div class="post-metadata">

**Author:** ![Humaniac](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/humaniac/32/14592_2.png) [@Humaniac](https://forum.shopware.com/u/Humaniac)\
**Post date:** [22. August 2021 um 15:39 UTC](https://forum.shopware.com/t/shopware-6-root-verzeichnis-ohne-oeffentlich-sichtbares-public-verzeichnis-aendern/89895/7 "2021-08-22T15:39:16Z")

</div>

Die Shopware Dateien wurden selbstverständlich unter public\_html abgelegt. Da dieses das Rootverzeichnis der gesamten Installation ist und die Seite über /public von außen zugänglich ist, wurde von mir auch die Umleitungen auf dem Server in /public geändert.

Dennoch bzw. der Umleitung zufolge wird im Browser des Users hinter dem Domainnamen /public auch angezeigt. Irgendwas muss doch da noch geändert werden, damit dann nur der Domainname zu sehen ist.

---

<div class="post-metadata">

**Author:** ![SCOOPEX](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/scoopex/32/18328_2.png) [@SCOOPEX](https://forum.shopware.com/u/SCOOPEX)\
**Post date:** [22. August 2021 um 16:36 UTC](https://forum.shopware.com/t/shopware-6-root-verzeichnis-ohne-oeffentlich-sichtbares-public-verzeichnis-aendern/89895/8 "2021-08-22T16:36:52Z")

</div>

Hallo,

siehe oben - Dein documentroot zeigt halt nicht auf public. Wenn der documentroot korrekt konfiguriert wäre, ist /public als URL gar nicht mehr erreichbar.

Viele Grüße
