We can easily configure Apache or NGINX server with specific port(s) to a domain or url.
In this section i would like to share how to configure NGINX web server with two different ports for a domain and then map one url to a specific port.
This way we are also forwarding the a http request to another port.
To clarify myself in easy way let me to define the task like below.
Say, port 8080 will server all the requests to the domain where API (could be REST) related requests will be served via port 8888.
So it becomes like this -
http://localsite.dev:8080 should be the normal site and
http://localsite.dev:8888/myapi/myapi_key should serve the API related requests.
To implement the task above i had configured my Ubuntu 14.04 with PHP 5.9.x, NGINX, php5fpm, ....
server {
listen 8080;
root /usr/share/nginx/html/localsite.dev/index.php;
index index.php index.html index.htm;
server_name localsite.dev;
location ^~ /myapi {
deny all;
}
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5fpm.
sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
server {
listen 8888;
root /usr/share/nginx/html/localsite.dev/index.php;
index index.php index.html index.htm;
server_name localsite.dev;
location /myapi {
allow all;
}
location / {
deny all;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5fpm.
sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
Looking for a TYPO3 or Drupal or mean.io or React expert? Reach me at nirmalya.mondal@gmail.com
Saturday, July 2, 2016
Saturday, April 16, 2016
TYPO3 AJAX Example for Backend Extension Module (Extbase/ Fluid)
In our previous posts we've already became familiar with AJAX usage for Frontend Extensions. Here we'll go through with an example of AJAX usage for Backend Extension.
Handsontable (https://handsontable.com/) has been integrated with its free version to make this extension more attractive.
I've shared a screen and that is describing the output of the extension.
All Frontend users from fe_users table has been listed here. JSON data has been manipulated by Handontable view helper to display in editable Excel like spread sheet. But username data has been set as read-only.
TYPO3 version 7.6.0 and Extbase Framework for Extensions version 7.6.0 and Fluid Templating Engine version 7.6.0 has been used as development environment.
You can download and install this extension from GitHub. Link is here
https://github.com/nirmalyamondal/TYPO3-Extensions/tree/master/backend_ajax
You are most welcome with queries or projects related to this.
Handsontable (https://handsontable.com/) has been integrated with its free version to make this extension more attractive.
I've shared a screen and that is describing the output of the extension.
![]() |
Output Screen of Backend AJAX Example Extension Module |
All Frontend users from fe_users table has been listed here. JSON data has been manipulated by Handontable view helper to display in editable Excel like spread sheet. But username data has been set as read-only.
TYPO3 version 7.6.0 and Extbase Framework for Extensions version 7.6.0 and Fluid Templating Engine version 7.6.0 has been used as development environment.
You can download and install this extension from GitHub. Link is here
https://github.com/nirmalyamondal/TYPO3-Extensions/tree/master/backend_ajax
You are most welcome with queries or projects related to this.
Subscribe to:
Posts (Atom)