How to set web app as default (no subdirectory in url) using Zend Server Cartdridge in Openshift? - apache

I am creating a web app in Zend Framework 2. Deployed it to a Zend Server 6 gear in OpenShift using Zend Studio 12, to my surprise when I tried the url: http://myapp-mydomain.rhcloud.com I got a page with info on the Zend Server itself, then I logged in to the server at http://myapp-mydomain.rhcloud.com/ZendServer/Login to realize that the app was created to run in this url: http://myapp-mydomain.rhcloud.com/MyAppName.
This is definitely not what I wanted, since the users won't like (I bet) having to write the address plus the app name as a subfolder (/MyAppName). I know that when adding the DNS config the name will be shorter, but still will look like "http://myApp.com/MyApp", it doesn't make sense to me, it is like having to type the Google Url like "http://google.com/app" that is not nice (for saying the least).
Is there any way I can configure Zend Server, OpenShift Gear, maybe .htaccess or something like that in order to avoid having to use the subfolder part of the url and having this app as the default for my Zend Server Cartdrige?
This may sound simple but I have been researching this for hours. Probably I am too much into the problem so that I can't find the solution (even with lots of coffee), I'll appreciate any help/comments.
Thanks.

Related

PHPBB 3.0.1 website migrating to new hosting service

I am trying to find some guidance on where to go next on the issue I am having migrating a phpbb3 site from one hosting service to another.
I have checked to make sure the config.php file has been changed to work on the new server, as well as the common.php file. I am getting a HTTP 500 error when I try to search for the forum. The main site is working normally, just the message board is having a problem.
Nothing about the structure of the sites pages has changed, only the hosting server. (I downloaded a copy of the website before moving it so I have everything in the exact way it was before, just on the new server.)
Do I need to install phpbb onto the server itself with Softaculous?
Anything would help, I need to get the site back up and running soon.
Thanks in advance.
Jacob
This post would have been better addressed on phpBB.com support section...
In any cases most hosting companies out there will perform the migration for you for free.
Did you ask about handling a migration for you?
There are many things that need to be done when migrating to a new hosting.
here a couple of pointers for you:
-PHP version in use should be PHP 5.6.x as phpBB 3.0.x does not support higher PHP versions
-config.php might need updating, for example these two fields:
$dbhost = '';
$dbport = '';
-check your error logs in your cPanel as they will reveal the cause of the 500 error
Also, NO you do not need Softaculous
I'll be happy to help you with this if you PM me on:
https://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=1428301
-SiteSplat
The php version on the new hosting services server was above what phpBB 3.0.x needed. I upgraded phpBB to version 3.2.9 and the issue was resolved.

aspboilerplate multi-tenant configuration using {0}.domain.com format

I downloaded the latest aspboilerplate. In documentation
it lists 3 tenant resolvers.
document ask to add;
Configuration.Modules.AbpWebCommon().MultiTenancy.DomainFormat = "{0}.mydomain.com";
to get domain based tenant resolving.
I am using hosts file to simulate actual URLs. So, I feel the app config should be something like below (apart from above code change to Abp module);
"App": {
"ServerRootAddress": "http://server.mydomain.com",
"ClientRootAddress": "http://{0}.mydomain.com",
"CorsOrigins": "...."
},
But the documentation doesn't mention anything related to that. So, I don't think the documentation is complete.
Then in IIS, I have two sites.
API site : server.mydomain.com. Bindings set to server.mydomain.com
Client site : mydomain.com. A new binding will be added such as subdomain.mydomain.com for new tenant(s). So basically in IIS for client site there can be many bindings with different subdomains portion, but pointing to the same site.
Then I ran the api site xxxx.web.host.exe. I assume it should pick the correct urls to listen to from appsettings. But it doesn't. it shows;
Now listening on: http://localhost:5000
And I am not sure where its coming from since there is no reference to that in code.
How can I get this properly configured to run on IIS with subdomain based tenant resolver?
Actual issue(s) were outside of what I have thought. In brief;
https://edi.wang/post/2018/12/27/path-caveat-with-aspnet-core-22-iis-hosting is one issue which crashed the app at the very beginning. Reason is it was loading log4net config file at Startup() and because of the way asp.net core 2.2 works, in IIS inproc mode it can't find the file.
https://weblog.west-wind.com/posts/2019/Mar/16/ASPNET-Core-Hosting-on-IIS-with-ASPNET-Core-22 this helped a lot to understand and tackle the issue.
Make sure you don't mix 32bit 64bit when hosting in IIS.

Yii app on Amazon EC2 how to make it work?

I would like to deploy a Yii app to Amazon EC2.
I've installed httpd, mysql, php and all the necessary modules.
The app was running fine on my wampserver localhost.
I've transferred everything (DB, app folder) but I'm having issues with accessing the site. I see default apache site, and I see directory structure under var/www/html/app folder, and var/www/html/app/web gives a blank page (or Internal Server Error). I have a .htaccess file in var/www/html/app/web. I was searching a lot, and have found informations about allowoverride, virtual hosts (I have only IP, what is server name then? the IP?), etc, and have tried a few different things, but I don't want to mess it completely up, and I'm pretty sure it must be some very simple adjustments to make it work, but I don't know what (maybe some settings with EC2 like elastic IP? I dont yet have that one but I'm not sure I need it). I don't have much experience, can you please point me to the right direction what else I have to set in order to make it work? Thank you very much!
UPDATE: I have set Elastic IP up and registered a domain.
I have simply chosed another image, and without any special actions it works. The first was an Amazon Image, now it's an Ubuntu.

Masking or changing certain text in URL

I'm using Composer with Toran Proxy hosted on a personal server to manage my package dependencies for Symfony2, today I encountered a problem, one of the URLs that Composer needs to download ends with dependecy-injection.json, every other URL downloads OK, but having those words it's something the proxy doesn't like, so it blocks it.
I have full access to the server, is there a way to mask o change that certain URL to make it look like another one and so "bypassing" the proxy?
This is the URL:
http://domainexample/toran/web/app.php/repo/packagist/p/symfony/dependency-injection.json
I'm using Apache2 as web server.

Building a service for a Drupal site to duplicate a node to another Drupal site in a multi-site setup

I'm trying to set up one of my Drupal sites to push a node to another Drupal site in a multi-site configuration. It looks like I need to do this with services somehow, but I can't find any tutorials out there and I need at least to be pointed in the right direction.
What I believe I need is set up Services on the receiving site to accept a call from the sending site which will be sending the node object via Json or serialized PHP using a Key that was set up on the receiving site. Can anyone show me an example of this working or give me some insight?
thanks
have you checked out the deploy module on d.o (drupal.org)? It's a great tool to push changes (also nodes) from one installation to another. It uses the services module for the communication.
I have not tested it with a multisite installation, but I guess it should work if at least the domain names are different for each site.
Regards
Mike