Masking or changing certain text in URL - apache

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.

Related

Moving Jira Server to https - gadgets and app search no longer working

I have recently moved our Jira Server installation to an https URL - we have a reverse proxy setup and I have configured apache/Jira according to atlassian's docs. https://confluence.atlassian.com/kb/securing-your-atlassian-applications-with-apache-using-ssl-838284349.html
We can access and use Jira with no issues, however the activity feed on the dashboard, and the search function to find new apps is no longer working.
When i look at the console it still appears to be trying to access the http:// version of the URL even though I have updated the base URL to the https version.
When I view source, I can see several references to the old http:// version of the URL. e.g.
WRM._unparsedData["com.atlassian.servicedesk.core-ui:util-base-url.base-url"]="\"http://jira.xxx.xxx\"";
<input type="hidden" id="upmBaseUrl" name="upmBaseUrl" value="http://jira.xxx.xxx">
<input type="hidden" value="http://jira.xxx.xxx/plugins/servlet/upm/marketplace" name="upmUriMarketplace" id="upmUriMarketplace">
Is there some other place where this needs to be updated? I've tried a general search/replace in the database, and i've grepped the installation and application data directories for the old URL.
Could it be a cache issue?
To move the Jira site to a new HTTPS location, you generally need to ensure that you have configured both:
the base URL, and
the proxyName, proxyPort, secure, and the scheme in the <Connector> of Jira's conf/server.xml. Also ensure that you're editing the correct <Connector> (since there are multiple in the default install, some of which are commented out).
You mentioned that you have done both of these, but the symptoms suggest that either #1 or #2 might not be complete or 100% correct.
If you are using a containerized version of Jira, also make sure that any environment variables also correspond to your new setup, since these can override settings in the above places.
For example, if you are using the official Docker image, this means variables such as ATL_TOMCAT_SCHEME, ATL_TOMCAT_SECURE and the like.

Shipyard, how to add "context" or "base path"?

I'm trying to setup a Shipyard server (controller) at work, but I've run into an issue. The server is up and running, which I can confirm with curl just fine. And we've configured Apache httpd to do forwarding, as we intend for the machine running Shipyard to not be directly accessible. So basically we setup a rule for Apache that incoming requests to /shipyard map to :8080/ which is where it's being served from. So the problem is that I need a way to tell Shipyard to remap "/" to "/shipyard". When I try to go to the Shipyard homepage, nothing on the page loads correctly. For example, Shipyard tried to load some js files:
/app/images/images.module.js
But to work with our forwarding, it needs to try to load:
/shipyard/app/images/images.module.js
With the kinds of servers I'm used to working with, this would normally be done by specifying a "context" or "base path" in your server config for it to serve from. I'm wondering how to do something similar for Shipyard?
It turns out there is already a github issue for this exact scenario:
https://github.com/shipyard/shipyard/issues/972

Move files from node.js to apache server

Is there any possible for moving files from platform like Heroku to second server like Apache? I want to create application and push it to Heroku, but I have also Apache server and I want send to this server all images which I upload from frontend forms.
EDIT
ok so You want to use Heroku as the main application server. But then Heroku makes HTTP/HTTPS requests to the Apache server?
I think thats what you are asking.
Yeah no issues with that. if you want to set up API id go with Laravel 5.3 and use its passport function on your Apache server ( but this is not required, this is only for security.)
https://laravel.com/docs/5.3/passport
END OF EDIT
what the web server is really does not matter at all.
Its about if the server has internet access and im pretty sure they do.
Easiest way is ftp,SSH,or git. unless they both have a web server then id just zip up your app without the node_modules folder and move it into the web directory. then go to the address of your server in a web browser. eg. http://mywebsite.com/files-i-just-zipped.zip and download them. (i normally log onto the new server via SSH and do wget http://mywebsite.com/files-i-just-zipped.zip)
I need more info but yeah. once you unzip then you need to install node but my guess is they already have it.
then do npm install in the package.json directory.

htaccess http request re-routing

Reason for Problem:
I'm working on a website and wanted to work on it without making edits to the live website. My hosting package allows for "infinite" domains. So instead of editing the live website I create a new domain, without purchasing the domain name and am trying to develop with this new domain.
Issue At Hand:
This issue is that the reference file paths don't work anymore and return 404 when trying to load the webpage. My original website directory structure looks like this
cgi-bin
config
public_html
->JSfiles
->CSSfiles
->PHPfiles
The new one is the same structure however when you open the "temporary web address" the URL looks like this
http://217.199.187.199/myTempAddress.com/"
instead of
http://myTempAddress.com/
so when my index.html file looks for /JSfiles/someJSfile.js its requesting
http://217.199.187.199/JSfiles/someJSfile.js
when it needs to be requesting
http://217.199.187.199/myTempAddress.com/JSfiles/someJSfile.js
Things I've Tried Unsuccessfully:
I would really like to fix this by redirecting with the .htaccess file in the root directory on the server. Ive tried using the following directives with no success.
Redirect /217.199.187.199/JSfiles/mustache.min.js http://217.199.187.199/myTempAddress.com/JSfiles/mustache.min.js
Redirect /JSfiles http://217.199.187.199/myTempAddress.com/JSfiles/
Redirect /JSfiles http://217.199.187.199/myTempAddress.com/
Redirect /JSfiles 217.199.187.199/myTempAddress.com/
Question:
How can I redirect the requests to the right location? I need all the the requests to be of the form http://217.199.187.199/myTempAddress.com/someDir/Somefile.ex
You need to read up a bit more on Virtual Hosting in particular name based virtual hosting.
https://httpd.apache.org/docs/current/vhosts/name-based.html
It sounds like your provider might support name based VHosts but what you're trying to do is not taking advantage of that. To do what you want ie have path that points to a different version of your site is best achieved using mod_rewrite. See this
https://httpd.apache.org/docs/2.4/rewrite/remapping.html
You need to make sure that your provided actually supports this.

Configuration setup for Glass fish server v4

We are using java based web application. I have deployed application in glass-fish server.
After deployed the application url look like https://www.domain.net/applicationname/home.jsp but i don't want to enter the full url.
I need something like https://www.domain.net it will go to the application home page.
Can please example any one.
The most common way to do this is to use Apache or Nginx as a load balancer or proxy in front of GlassFish. If you want to connect directly to GlassFish, you will need to set the context root of your application to /.
The most "portable" way to do this is in the web.xml, but you can do it at deploy time instead:
https://alexismp.wordpress.com/2007/08/30/glassfish-tip-have-your-application-be-the-root-application/