<p>What "solved" my problem was to set cpresources permissions to 777, which isn't a fix, clearly. Doing so made the dashboard available and I was able to alter asset volume paths, so the site now displays images. The rest of the solution is to be found in discussion with Namecheap support, I believe. Anyway, the solution thus far was found here:</p>

<p><a href="https://craftcms.stackexchange.com/questions/27001/craft-3-admin-panel-only-accessible-when-web-cpresources-is-exectuable-for-every">Craft 3 admin panel only accessible when web/cpresources is exectuable for everyone</a></p>

CC BY-SA 4.0
2019-09-06T21:57:28.547Z
2019-09-06T21:57:28.547Z
Richard Dyck
<p>The contents of the "web" folder should be inside public_html, not public_html/web. The craft folder (or it's contents) can then go into private_html (or whatever you have as a private folder, if any). Just remember to point index.php to the right folder for it to load.</p>

<p>It should in practice work if you set the right flags in .htaccess or nginx config, but there might be some inherent bug or hardcoded paths/routes in Craft. Not sure what might be causing it other than cpresources not being in /public_html/</p>

CC BY-SA 4.0
2019-09-03T22:32:52.133Z
I explained badly. An addon domain at Namecheap is created above public_html. I have a different site in public_html. So everything Craft, maintaining its directory structure, is in that root-situated directory.  I suspect I don't understand something basic or that I need to talk with Namecheap support. But please, I'm all for criticism or any hints.
Richard Dyck
CC BY-SA 4.0
2019-09-03T23:24:43.640Z
Oh, gotcha! Is the folder structure something like /customer/x/number/domain_com/public_html or is it /customer/x/number/domain_com/additional_domain_com/ sitting right next to the public_html folder?
Anders
CC BY-SA 4.0
2019-09-04T01:09:59.167Z
It's like your second example: home/stalmqlb/<site-name>/web/index.html
Richard Dyck
CC BY-SA 4.0
2019-09-04T01:16:44.410Z
home/stalmqlb is the root. The account's public_html is in there as a neighbour to the add-on domain <site-name>. The add-on has no public_html for itself.
Richard Dyck
CC BY-SA 4.0
2019-09-04T01:19:25.237Z
that path should end with index.php not index.html which is just a "please be patient" page
Richard Dyck
CC BY-SA 4.0
2019-09-04T02:22:45.137Z
Got it. Have you tried just dropping the contents of /web/ into the home/stalmqlb/<site-name>/? The index.php in there just needs to point to the craft folder either relative to the index.php location or an absolute path.
For example, if you had it like this; home/stalmqlb/craft/ then in the index.php inside home/stalmqlb/<site-name>/ should point to ../craft/ or perhaps like so; `define('CRAFT_BASE_PATH', dirname(__DIR__).'/craft');`
For good measure, try to drop in a index.php with this `<?php echo(dirname(__DIR__)) ?>` that should output the absolute path to the root folder.
Anders
CC BY-SA 4.0
2019-09-04T02:22:55.893Z
Very strange that the front-end works though!
Anders
CC BY-SA 4.0
2019-09-03T14:23:59.837Z
2019-09-03T20:55:18.827Z
2019-09-03T20:55:18.827Z
Anders
<p>The login page has no styling, including no Powered by image. This is what displays beneath the site's title:</p>

<p><a href="https://i.sstatic.net/E0WRI.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/E0WRI.png" alt="Unstyled Admin Login"></a></p>

<p>When I try to login I receive:</p>

<p>Bad Request
Unable to verify your data submission.</p>

<p>The site is one I moved from dev to production, from a local to remote server. I used checkit.php on the remote server and it passed. I know the paths to asset volumes are incorrect, so while public pages display properly, they do so without images, which is what I was trying to login to fix. CSS, JS, text pulled from the database--all work.</p>

<p>What could be wrong? Thank you in advance for any help.</p>

<p>[Edit]</p>

<p>Thank you for responding. This site is on a Namecheap Stellar Business shared hosting plan. It's an addon domain. The "web" directory is set as document root. The site's folder is above the public_html directory in the hosting account's root directory.</p>

<p>Yes, there are 404 errors in the console. The unfound files exist where they should, in the web/cpresources directory. The 404 paths don't include the "web" directory.</p>

<p>Because the web directory is set to root, won't resources in the web folder will be found even if the "web" directory doesn't show up paths? The web/index.php file is found without "web" being in the url. The site loads for visitors to the site.</p>

CC BY-SA 4.0
2019-09-02T18:47:47.657Z
View your JavaScript console and you'll probably see errors attempting to load the JavaScript CP resources.  Also given that this is likely a hosting/devops issues, can you provide more information on how/where the site is hosted?
andrew.welch
CC BY-SA 4.0
2019-09-02T21:43:28.940Z
Thank you @andrew.welch I've added more info to question.
Richard Dyck
<craft3><admin><login>
Visitor-facing pages work; admin login doesn't--I can't login in to admin
# Visitor-facing pages work; admin login doesn't--I can't login in to admin

(Asked by: username_0 on 2019-09-02)

The login page has no styling, including no Powered by image. This is what displays beneath the site's title:

[![Unstyled Admin Login](https://i.sstatic.net/E0WRI.png)](https://i.sstatic.net/E0WRI.png)

When I try to login I receive:

Bad Request
Unable to verify your data submission.

The site is one I moved from dev to production, from a local to remote server. I used checkit.php on the remote server and it passed. I know the paths to asset volumes are incorrect, so while public pages display properly, they do so without images, which is what I was trying to login to fix. CSS, JS, text pulled from the database--all work.

What could be wrong? Thank you in advance for any help.

[Edit]

Thank you for responding. This site is on a Namecheap Stellar Business shared hosting plan. It's an addon domain. The "web" directory is set as document root. The site's folder is above the public\_html directory in the hosting account's root directory.

Yes, there are 404 errors in the console. The unfound files exist where they should, in the web/cpresources directory. The 404 paths don't include the "web" directory.

Because the web directory is set to root, won't resources in the web folder will be found even if the "web" directory doesn't show up paths? The web/index.php file is found without "web" being in the url. The site loads for visitors to the site.

**Tags:** craft3, admin, login
> **Comments:**
> **username_1**: View your JavaScript console and you'll probably see errors attempting to load the JavaScript CP resources.  Also given that this is likely a hosting/devops issues, can you provide more information on how/where the site is hosted?  
> **username_0**: Thank you @andrew.welch I've added more info to question.  

---

## 2 answers

### Answer by username_0 on 2019-09-06. Score: 1 | Accepted answer

What "solved" my problem was to set cpresources permissions to 777, which isn't a fix, clearly. Doing so made the dashboard available and I was able to alter asset volume paths, so the site now displays images. The rest of the solution is to be found in discussion with Namecheap support, I believe. Anyway, the solution thus far was found here:

[Craft 3 admin panel only accessible when web/cpresources is exectuable for everyone](https://craftcms.stackexchange.com/questions/27001/craft-3-admin-panel-only-accessible-when-web-cpresources-is-exectuable-for-every)


---

### Answer by username_2 on 2019-09-03. Score: 1

The contents of the "web" folder should be inside public\_html, not public\_html/web. The craft folder (or it's contents) can then go into private\_html (or whatever you have as a private folder, if any). Just remember to point index.php to the right folder for it to load.

It should in practice work if you set the right flags in .htaccess or nginx config, but there might be some inherent bug or hardcoded paths/routes in Craft. Not sure what might be causing it other than cpresources not being in /public\_html/

> **Comments:**
> **username_0**: I explained badly. An addon domain at Namecheap is created above public_html. I have a different site in public_html. So everything Craft, maintaining its directory structure, is in that root-situated directory.  I suspect I don't understand something basic or that I need to talk with Namecheap support. But please, I'm all for criticism or any hints.  
> **username_2**: Oh, gotcha! Is the folder structure something like /customer/x/number/domain_com/public_html or is it /customer/x/number/domain_com/additional_domain_com/ sitting right next to the public_html folder?  
> **username_0**: It's like your second example: home/stalmqlb/<site-name>/web/index.html  
> **username_0**: home/stalmqlb is the root. The account's public_html is in there as a neighbour to the add-on domain <site-name>. The add-on has no public_html for itself.  
> **username_0**: that path should end with index.php not index.html which is just a "please be patient" page  
> **username_2**: Got it. Have you tried just dropping the contents of /web/ into the home/stalmqlb/<site-name>/? The index.php in there just needs to point to the craft folder either relative to the index.php location or an absolute path. For example, if you had it like this; home/stalmqlb/craft/ then in the index.php inside home/stalmqlb/<site-name>/ should point to ../craft/ or perhaps like so; `define('CRAFT_BASE_PATH', dirname(__DIR__).'/craft');` For good measure, try to drop in a index.php with this `<?php echo(dirname(__DIR__)) ?>` that should output the absolute path to the root folder.  
> **username_2**: Very strange that the front-end works though!  

---

