why toran generate package json with domain : examle.org? - toran-proxy

I do as toran proxy document step by step, but i occur a problem
I have configure toran_host and toran_prot in parameters.yml, but generated package josn remain using the the domain
example.org
Package.json
I try to find issue source, but the application is too complex for me.
this is my parameters.yml:
parameters:
# this secret should be changed to something unique and random if possible
secret: ThisTokenIsNotSoSecret-Change-It
# http or https depending on your hosting setup
toran_scheme: http
# in case you use non-standard ports you can update them here
toran_http_port: 91
toran_https_port: 443
# the hostname toran is hosted at
toran_host: 121.199.35.34:91
# e.g. /foo if toran is hosted in a sub-directory, or leave it empty if it is on its own domain, no trailing slash!
toran_base_url:

but have you tried clearing the cache? Delete
everything in ·app/cache/· and try again, because the parameters need to
be set correctly before the cache is created otherwise it is not rebuilt.
this answer come from Jordi's email to me, he is a author of toran, thank for nice and hard work .

You have to modify your config file at app/config/parameters.yml:
# the hostname toran is hosted at
toran_host: example.org
Then delete the production cache at app/cache/prod, and finally run the cron job again php bin/cron -v
For further instructions follow official installation documentation here: https://toranproxy.com/download

Related

Reverse Proxy Rules Removed automatically from Cpanel httpd.conf file after server update

I am getting en error in Apache since long time.
And the issue is that after some time, reverse proxy rules removed from Apache virtual host automatically.
Is there anyone who can help me out on this issue ?
This issue has been resolved now, with the help of Cpanel support team.
#Cpanel_Reply
The most common reason that a configuration setting would get removed from WHM/Cpanel when rebuilding the httpd.conf file is because the modification was done directly to the configuration file. When cPanel rebuilds the apache conf, it does so using template files and any configuration not in those templates are not included.
#Solution
cPanel Apache Reverse Proxy
Step 1. Download The Proxy Script
wget https://raw.githubusercontent.com/varunsridharan/cpanel-apache-proxy/main/proxy.sh
Step 2. Run To Create A New Proxy
sh proxy.sh "cpanelAccountName" "blog.example.com" "http://192.168.1.41:32000"
Step 3. Rebuild & Restart HTTP
/scripts/rebuildhttpdconf && service httpd restart
Regards
Subhash sautiyal
tech2towards

Install drupal project with drupal in a subdirectory

My customer a has production environment with the following folder structure:
- www
|- maresmuseum
where I only have access to these two empty folders, being the "maresmuseum" the public_folder.
I've deployed my Drupal 9 site with composer, like the project-recommended way does, you know: placing the index.php along many other core related folders & files in "maresmuseum" folder, and /vendor, /tmp and many other private stuff in the "www" folder.
As a result, I can access my website through a url like this: https://example.com/maresmuseum (I'm quite sure my customer has a .htaccess rule somewhere to accomplish that, don't you?)
Given this production scenario, and having in mind I work with DDEV on local, I want to install this site on my local machine so I can access it with a url like this: https://example.local/maresmuseum.
Of course, all inner pages of this site must follow this url pattern, something like this:
https://example.local/maresmuseum/about-us
https://example.local/maresmuseum/contact, etc..
How should I configure DDEV to accomplish that?
Thanks in advance.
I'm sure there are many ways to do this. Here's one way to do it using nginx configuration changes.
I used https://blog.rebootr.nl/drupal-8-in-a-subdirectory-with-nginx/
ddev config --composer-root=maresmuseum --project-type=drupal9 --webserver-type=nginx-fpm --docroot=maresmuseum/web --create-docroot --web-working-dir=/var/www/html/maresmuseum (This sets up to put composer.json in maresmuseum)
Install Drupal 9: ddev composer create drupal/recommended-project --no-install
ddev composer require drush/drush
Install project, or load db, or whatever, maybe ddev exec vendor/bin/drush si -y demo_umami --account-pass=admin
Edit the .ddev/nginx_full/nginx-site.conf to remove the #ddev-generated and replace the location stanza, example in https://gist.github.com/rfay/5248e5f75bf3e27d84965bfdfc69c240#file-nginx-site-conf
Edit the maresmuseum/sites/default/settings.php to add the stanza suggested in the article to the bottom, example in https://gist.github.com/rfay/5248e5f75bf3e27d84965bfdfc69c240#file-settings-php
ddev restart && ddev launch /maresmuseum
https://<project>.ddev.site/maresmuseum will work fine (as it will without the directory).
I had some trouble with browser cache, so you'll want to pay attention to that.

Can't open a website installed from CluedIn Home repo

I had a working instance of CluedIn installed from the Home repo (https://github.com/CluedIn-io/Home).
For the last few days, I can't reach it. Say, my organization name is foobar: when I open http://foobar.127.0.0.1.xip.io:9080/ (which used to work just fine last week), my browser can't reach the page and shows DNS_PROBE_FINISHED_NXDOMAIN.
This issue happens when http://xip.io/ is down.
To solve the problem, please, use another wildcard DNS provider. For example, https://nip.io/.
There is only one change you need to do in the Home repo - in the .env file, change this line:
CLUEDIN_DOMAIN=127.0.0.1.xip.io
To this:
CLUEDIN_DOMAIN=127.0.0.1.nip.io
And then run ./cluedin.ps1 up.
Your site will be available at http://foobar.127.0.0.1.nip.io:9080/
Should you need to script this, you can run the following:
./cluedin.ps1 env -set CLUEDIN_DOMAIN=127.0.0.1.nip.io # sets for the default environment
or
./cluedin.ps1 env dev -set CLUEDIN_DOMAIN=127.0.0.1.nip.io # sets for a custom environment called dev
For the Helm chart you have to update the dns section ..
v3.2.2
global:
dns:
hostname: "127.0.0.1.nip.io"
.. or in older versions of the chart v3.2.1 and below ..
dns:
hostname: "127.0.0.1.nip.io"
Once deployed it should restart effected pods but the server, ui and gql deployments might need to be restarted to pick up new configmap values.

Error parsing proxy URL. Bad port number

When I use wget command in RHEL 6.5, getting the error
Error parsing proxy URL. Bad port number.
The command used to set the proxy was
export http_proxy="http_proxy://username:password#address:port/".
Yes I know this issue can be resolved by using
http_proxy=address wget --proxy-user=username --proxy-password=<password> url.
But I want to install a package and during installation, it will need to download few other packages. so the proxy should be already set and ready before the installation. How can we resolve this?
The password I used caused this issue as it had a # in it. I replaced # with %23 [UTF encoding] and now this is working fine.
make us Use of "--no-proxy"
Example : wget https://dl-ssl.google.com/linux/linux_signing_key.pub --no-proxy
This will elimimate the current proxy and try to download what ever we need..
I set up the proxy on Ubuntu using general system settings (manual option).
The problem was I pasted the proxy URL with a port, while the port is also separately specified there, in different field.

NPM behind NTLM proxy

Is it possible to run npm install behind an HTTP proxy, which uses NTLM authentication? If yes, how can I set the server's address and port, the username, and the password?
I solved it this way (OS: Windows XP SP3):
1. Download CNTLM installer and run it.
2. Find and fill in these fields in cntlm.ini. Do not fill in the Password field, it's never a good idea to store unencrypted passwords in text files.
Username YOUR_USERNAME
Domain YOUR_DOMAIN
Proxy YOUR_PROXY_IP:PORT
Listen 53128
3. Open console, and type these commands to generate password hashes.
> cd c:\the_install_directory_of_cntlm
> cntlm -H
Password: ...type proxy password here...
PassLM D6888AC8AE0EEE294D954420463215AE
PassNT 0E1FAED265D32EBBFB15F410D27994B2
PassNTLMv2 91E810C86B3FD1BD14342F945ED42CD6
4. Copy the above three lines into cntlm.ini, under the Domain field's line. Once more, do not fill in the Password field. Save cntlm.ini.
5. Open the Service Manager (from command line: services.msc), and start the service called "CNTLM Authentication Proxy".
6. In the console, type these lines:
> npm config set proxy http://localhost:53128
> npm config set https-proxy http://localhost:53128
> npm config set registry https://registry.npmjs.org
7. Now npm view, npm install etc. should work. Example:
> npm view qunit
...nice answer, no errors :)
CNTLM answer was working for me, but with connection errors make npm unusable. I've fixed them by adding this header in CNTML.
Header Connection: close
Another alternative is to use Px for Windows which talks NTLM on your behalf like Cntlm and NTLMAps without having to provide your credentials. It uses the logged in user's credentials via SSPI.
Rather than running CNTLM, you could instead try running Fiddler when you need to use npm. I've found this works in fairly locked down environments (e.g. investment banks). It's also a tool that is fairly easy to make a business case for (if you need to) since it's invaluable for checking/creating/altering HTTP traffic.
I've had to go this route before due to usage of smartpass authentication - i.e. we didn't actually have passwords. At those locations setting up CNTLM would have been impossible.
You can pass the settings as parameters:
npm --proxy=http://username:password#proxyserver:port --proxy-https=http://username:password#proxyserver:port --registry=http://registry.npmjs.org/ install whateveryouwanttoinstall
CNTLM didn't work for me. I tried all possible combinations. NPM was giving Authentication error. Fiddler came for rescue and saved my time. It is easy to install and configure. Set Fiddler Rule to Automatically Authenticated.In .npmrc set these
registry=http://registry.npmjs.org
proxy=http://127.0.0.1:8888
https-proxy=http://127.0.0.1:8888
http-proxy=http://127.0.0.1:8888
strict-ssl=false
It worked for me :)
Another Fiddler Option:
A second way to make Fiddler act as an HTTP proxy for NTLM and other protocols is to leave the auto authenticate options/rules defaults in place and go to this setting from the menu bar:
Tools > Telerik Fiddler Options > Connections tab
Click on the Allow remote computers to connect checkbox. You will see a dialog explaining the consequences of enabling this option. Restart Fiddler and update the .npmrc file as shown above. Whenever you need npm to access the registry site just run Fiddler. This setting won't affect the way Fiddler runs for other captures.
Open your .npmrc file in C:\users\username\ folder using notepad
Add the below lines..
Replace domain, username, pwd, servername with your correct values
Try to install or get packages now
If trying from Vs2017, close and reopen VS IDE, then only it works
proxy=http://DOMAIN%5CUSERNAME:PWD#proxy.servername.com:6050
https-proxy=http://DOMAIN%5CUSERNAME:PWD#proxy.servername.com:6050
http-proxy=http://DOMAIN%5CUSERNAME:PWD#proxy.servername.com:6050
strict-ssl=false
CNTLM worked for me as suggested by KOL. Thanks KOL for that. Just wanted to add that there are some oddities in individual proxies because of which the password may not be acceptable when using simple cntlm -H.
Use cntlm -I -M http://test.com and copy the below config after erasing older configs and you should be through.
The output is like
---------------------------------------------------
Auth NTLM
PassNT 8EE9B595A89F7D8774C2146FB302CBCF
PassLM 78901DA9889727EDE28EF9F2769485B9
----------------------------------------------------

Resources