cakePHP 3 on subdirectory - how to configure? - .htaccess

I'm using Wamp. (Bitnami's dist.).
I've used the composer to create the skeleton. and then I've used the cake bake shell to set the MVC files.
Now, when I access localhost/bookmarker I get the default cake page that says
Please be aware that this page will not be shown if you turn off
debug mode unless you replace src/Template/Pages/home.ctp with your
own version.
If I access localhost/bookmarker/bookmarks I see the app. What should I set to change this?
what I want is to access localhost/bookmarker and see the app.
Also, I have the same issue (o/c) with a virtual-host that I configures.

Related

app_artifact_location when the app is internationalized

I'm working with the new Azure Static Web Apps Preview product, not to be confused with Azure Web Apps.
My Angular 9 app, which runs fine locally, is all set up for internationalization, and one effect of the internationalization is that it drops my index.html into app/catfood/dist/en_US rather than app/catfood/dist.
This is leaving me stuck in terms of how to set the app_artifact_location value in the workflow file. If I leave it at the default value of "dist/catfood" the build gives me this error, which honestly does seem accurate as the index.html isn't going to be there:
Failed to find a default file in the app artifacts folder (dist/congruence-web). Valid default files: index.html,Index.html.
If your application contains purely static content, please verify that the variable 'app_location' in your workflow file (located in .github/workflows) points to the root of your application.
If your application requires build steps, please validate that a default file exists in the build output directory.
But if I change it to the logical "dist/catfood/en_US" I get this error:
The app build failed to produce artifact folder: 'dist/catfood/en_US'. Please ensure this property is configured correctly in your workflow file.
Really not sure what the build system is expecting of me. What should I be using for app_artifact_location? Or am I even tweaking the wrong thing here?
Update: When I deliberately turn off i18n in angular.json, the en_US directory goes away and index.html is found in dist/catfood and everything works great. So basically the problem is "Why does Azure Static Web Apps not understand localized Angular applications?"

HOWTO determine why Hybris extension will not load

I am working on setting up a Hybris B2B instance and when I look in HAC's Extensions the storefront has a red X, not a green checkmark. I assume that means there is an error somewhere, where do I go to find the error?
Some background on what I have done:
extract Hybris 1811
install -r b2b_acc_plus
ant clean all
ant modulegen and selected accelerator...
ant clean all
ant initialize
hybrisserver.sh
At that point the server is running, I can get to the HAC, but cannot get to the storefront. I am guessing I might be missing a step, too, but all the same, there are other extensions that have the red X so I would like to understand how to explore the reason why.
Red Cross against storefront extension in Hybris Admon Console is to depict that its not a backoffice/hmc extension.
You would also notice a green check to depict its a core module.
Also in front of storefront extension, you willl not the webroot URL. Normally its default value is /yacceleratorstorefront unless one changed it.
You should be able to access storefront using
http://localhost:9001/yacceleratorstorefront?site=apparel-uk
You can change site param in URL to access any of the configured websites.
Example
...?site=electronics
...?site=apparel-de
Alternatively, you can add URL mapping in host file.
Make the following entry in your hosts file:
127.0.0.1 apparel-uk.local apparel-de.local electronics.local
Once your hybris server is running, you can access any of the following URLs:
http://electronics.local:9001/yacceleratorstorefront/
http://apparel-uk.local:9001/yacceleratorstorefront/
http://apparel-de.local:9001/yacceleratorstorefront/
Thanks

How could I prohibit anonymous access to my NodeRed UI Dashboard on IBM Cloud(Bluemix)?

I'm working with node-red, on boilerplate IBM cloud. I know that there is a way, changing the value of enviroments variables(NODE_RED_USERNAME and NODE_RED_PASSWORD), to change username and password of the editor flow. But, what about UI dashboard? I mean using dashboard nodes. Forbid access to
https://noderedservicename.mybluemix.net/ui/
I know that on the code, changing the variable httpNodeAuth on the file settings.js I can do what I want. What is the way for doing that on IBM Cloud?
Thank you in advance!
You need to add the httpNodeAuth (not the httpAdminAuth as this is for controlling access to the Node-RED editor and can done with the environment variables discussed in the other answer.) to the app/bluemix-settings.js file.
Something like this:
...
httpStatic: path.join(__dirname,"public"),
httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
functionGlobalContext: { },
...
Details of how to generate the pass can be found here
There are a number of ways you can edit the file, some of which include linking the Node-RED deployment to a git repository or downloading the whole app, editing the file and pushing it back to Bluemix (when you first deploy Node-RED from the starter pack it gives you instructions on how to download the source to make changes and then push them back. You can get to these instructions by clicking on the "Getting started" link in your Node-RED Bluemix console page).
But the quickest/simplest/dirtiest way is probably to just SSH into the instance and change the file with something like vi. Details on how to ssh to an app instance can be found here. But the following should work:
cf ssh [app name]
Once you have edited the file you will need to tell bluemix to restart the app. You can do this from the web console or with the cf command line tool.
(The changes made by this method will not survive if the app is restaged, or bluemix decides to move your instance to another machine internally because it will rebuild the app from the pushed sources. The permanent solution is to download the source, edit and push back)
This link will help you but it's written in Japanese.
http://dotnsf.blog.jp/archives/1030376575.html
Summary
You can define the "user-defined" environment variables through the IBM Cloud dashboard.
It contains the variables to protect Node-RED GUI.
You have to be set as follows
NODE_RED_USERNAME : username
NODE_RED_PASSWORD : password

I have copied files via FileZilla to Azure but the index page doesn't show

I shall try not to be subjective so as not be closed.
This is my first foray into Azure and it really is NOT like my dedicated server on another hosting company. Suffice it to say, what takes me minutes to deploy a site via FTP, then to IIS to set it up, has taken me WEEKS!
I don't want to set up any of the "pre-packaged" Quickstart solutions. I simply want my INDEX.HTML file to DISPLAY.
I copied all the files via Filezilla to Azure, quite easily, but yet, when I go to the URL, I keep getting:
Your App Service app has been created
Go to your app's Quick Start guide in the Azure portal to get started or read our deployment documentation.
Everything is set up on Azure perfectly.
Here's what it looks like under the appSettings Tab:
**Virtual applications and directories**
/ site\wwwroot Application …
/wwwroot site\wwwroot\mynewsite Application …
The directory, site\wwwroot\mynewsite has an index.html but it will not display when I type in the URL.
I already built the site and the company I'm working for wants it on AZURE.
A dedicated server takes under 15 min. This has taken weeks.
UPDATE:
Thiago, thank you... so here's the file structure below...
Reveals EXACTLY what my directory looks like. Under /thingblugrow is where "the fake name" mynewsite exists. I thought it'd be easier to just show you what I really have.
So, /thingblugrow has an index.html file....
If your want to visit http://yoursitename.azurewebsites.net/mynewsite/index.html,
The appsetting we need config it as following in your case:
Virtual applications and directories
/ site\wwwroot Application …
/mynewsite site\wwwroot\thingblugrow Application …
You also can refer to another SO Thread to get more info about creating Virtual applications and directories
You're adding an extra level, so in your case you'll be able to see the index through:
http://yoursitename.azurewebsites.net/mynewsite/index.html
Just move all the content from "mynewsite" folder to the parent directory (wwwroot).

CentOS 5.6: Apache access permission after .htaccess upload

I was working on my home server remotely and wanted to make some changes to my .htaccess. I could not see this files using my FTP(filezilla) and thought there was none there. I decided to upload one I had in my computer to my server in public_html and although the upload was successful per FZ, this file is not listed anywhere, even when I physically access the server.
It looks like it is being hidden. The main problem is that after this, now I get the following error message and cannot access my test site:
You don't have permission to access / on this server.
If I access my server and DISABLE SELINUX or make it PERMISSIVE, my pages start working as normal. If I make it ENFORCING my webpage becomes unavailable and I see the error listed above.
Questions:
First of all, how can I make this .htaccess visible in a CentOS 5.6 system?
What is the difference between ENFORCING and PERMISSIVE?
Will I run into Security Risks if I leave my server setup as PERMISSIVE?
Thank you all,
Heh. No one has answered this in 4 months because it's hard to find an answer that is direct & specific (per the guidelines) and won't start a discussion. But I'll give it a try.
FileZilla can show hidden files, the method is different for different versions. Try the View or Server menu, or look for "hidden" in the built-in help.
ENFORCING means that selinux is running and prevents actions that violate its active policies. PERMISSIVE means that selinux is running and logs (but does not prevent) actions that violate its active policies.
Yes. Specifically, in ENFORCING mode, a hostile entity would have to both upload a file with malicious code and set the selinux context for the file in order to run it. In PERMISSIVE mode, they just need to upload the file. This is the most likely explanation for your experience: you uploaded a new .htaccess file, but did not set its selinux context.

Resources