Two zend applications: one in a subdomain, one on root - zend-framework

I'm using Zend for my corporate website. This website contains two seperate applications, namely the website itself (which is a CMS) and the customer panel. The administration panel will be launched on a subdomain, namely customer.domain.com. The website runs on a shared hosting package.
What would be the smartest configuration for this situation?
Thanks,
Martijn

Create the admin panel as a module then use the Hostname router to direct the sub-domain requests to it.

I've choosen the following configuration. On domain-level I've created the application folder. This folder contains two folders, namely 'cms' and 'billings'. I've also created a ServerAlias so that the subdomain points to index.php. In index.php I use PHP's $_SERVER HTTP HOST to determine which application needs to be loaded.

Related

Bindings already exsist for a different website

In details on IIS in windows server.
IIS tree structure:
Default Web Site * Parent Root folder C:\inetpub\wwwroot\Applications\Default Web Site
Employee * Sub App Root Folder C:\inetpub\ExternalEmployee
Sample * Sub App Root Fodler C:\inetpub\TEST_Project
Goal:
I want to deploy my application in sub application folder "C:\inetpub\ExternalEmployee" but not in parent root folder. So when I browse www.contoso.com/sample I can see img2.png
my default site looks like.
Current Issues:
Bindings already exsist for a different website.
Config type: IIS website
IIS web App MAnage:
Web site named: Default web site
Physical path: %SystemDrive%\inetpub\Test_Project
Hope this helps in solving my issue.
Thanks.
If you were deploying your app to a deployment group in azure devops release pipeline. You can add IIS web app manage task to manage your web's Physical path and bindings before IIS web app deploy task.
Please check below example, if you want to deploy the application in sub application folder C:\inetpub\ExternalEmployee. You can set Physical path to C:\inetpub\ExternalEmployee.
And you can click the 3dots of the Add binding fields to set the binding.
Bindings already exsist for a different website.
To fix this error you can either set a new binding for your web app, or you can try to find out which website has taken the binding on the windows server and remove the binding using below script.
Get-WebBinding -Port 80 -Name "website name" | Remove-WebBinding
Hope above helps!

Are PWA sites in same domain not able to install both on home screen?

I created 2 PWA sites
https://s.maplat.jp/r/naramap and https://s.maplat.jp/r/aizumap
But these are not able to install on home screen together.
Once the one installed, the other cannot install.
Are there any specifications or limitations to install PWAs on same domain?
You can accomplish this with scoped apps. Update your manifest files to include a scope parameter with a value of the path that "app" should be served under.
"scope": "/r/aizumap/",
and
"scope": "/r/naramap/",
You can still be able to use a single service worker but each sub app will need to have a trailing / in it's path for the start_url/scope to work.
You can see a sample I've made and the source. It has a parent app, and two sub apps.
If you have two apps in same domain, map it to two different sub-domain with one service works for each of the sub-domain.
That will enable you to host it as a two different PWA and both can be added to home screen.
https://s.maplat.jp/r/naramap -> https://naramap.maplat.jp/r/
https://s.maplat.jp/r/aizumap -> https://aizumap.maplat.jp/r/

yii2 remove backend/web and frontend/web from url

I am trying to change site url from http://localhost/yiiwebsite/backend/web/index.php url to http://localhost/yiiwebsite/admin and http://localhost/yiiwebsite/frontend/web/index.php url to http://localhost/yiiwebsite/.
Can anyone help me to do this.
It's described in official docs here.
Here is some basic info:
The application installed according to the above instructions should
work out of box with either an Apache HTTP server or an Nginx HTTP
server, on Windows, Mac OS X, or Linux running PHP 5.4 or higher. Yii
2.0 is also compatible with facebook's HHVM. However, there are some edge cases where HHVM behaves different than native PHP, so you have
to take some extra care when using HHVM.
On a production server, you may want to configure your Web server so
that the application can be accessed via the URL
http://www.example.com/index.php instead of
http://www.example.com/basic/web/index.php. Such configuration
requires pointing the document root of your Web server to the
basic/web folder. You may also want to hide index.php from the URL, as
described in the Routing and URL Creation section. In this subsection,
you'll learn how to configure your Apache or Nginx server to achieve
these goals.
By setting basic/web as the document root, you also prevent end users
from accessing your private application code and sensitive data files
that are stored in the sibling directories of basic/web. Denying
access to those other folders is a security improvement.
If your application will run in a shared hosting environment where you
do not have permission to modify its Web server configuration, you may
still adjust the structure of your application for better security.
Further configuration depends on chosen web server (Nginx / Apache), which is not even mentioned in the questoin. But both options are covered in official docs by the given link.
For shared hosting environment there is special section too.
And by the way this was asked before many times here on SO, just do a better research.

Set document root in Zend Framework 1.12.x application in Azure Web Sites

I have a problem setting the document root for a Zend Framework application that I want to run in Azure.
Now I'm testing Web Sites, Cloud Service and VM's to deploy my work.
Deploying with Webmatrix works fine, but I need to set the document root of IIS to a subfolder.
- application
- htdocs => Webroot with Web.config
- libs
How do I set this? With a second Web.config outside of htdocs Redirecting inside? Tried that, but IIS doesn't seem to like it (500err).
The only thing I found was building a WEBSITE_PRIVATE_EXTENSIONS to change the ApplicationHost.config: Azure PHP Documentation
This seems to be which seems to be overly complicated...
Go to Portal and open the CONFIGURE tab for your site
Scroll all the way to the bottom
Change site\wwwroot to point wherever you want to

Configuring the webserver on a production site for Symfony

I am setting up my Symfony project on the production site. # this point it states:
This project uses the symfony libraries. If you see no image in this page, you may need to configure your web server so that it gains access to the symfony_data/web/sf/ directory.
Which basically means, I need to get into httpd.conf file and make some changes (for those who have diligently followed the Symfony tutorials, you guys know what I am talking about). Given this situation, I am not sure how I can go about configuring the httpd.conf file on the production server.
Anyone have any strategies around this? Thanks,
Parijat
You can do it by adding symbolic link from your symfony_data/web/sf to web/sf but your web server must follow symbolic links or you can add "Options Indexes FollowSymLinks" in to your .htaccess