PhpStorm browser button custom url - browser

Is it possible to change the url that the browser buttons in PhpStorm to go to a different url?
Currently these all take me to localhost:63342/[project name]/
I would like to direct these to a different address, [projectname].serveraddress:1111/ for example.
Currently my workaround is to use a PHP Web Page configuration but this required me to pick a browser at configuration level rather than being able to pick and choose.
I have a server config setup to automatically upload the files on change already.

Sure, just set up the Deployment entry and mark it as Default for this project.
When you are using "Open in Browser" or similar functionality, IDE looks for your default deployment entry and builds the URL based on those rules (web server URL + mappings).
If no default deployment entry is found then IDE builds URL for the built-in simple web server that uses localhost:63342/[project name]/path/file.ext URLs.
P.S. If it's a local server (files served directly from the original location) and no actual deployment is needed then use "In-place" type of config.

Related

Toggle relative paths to cloud depending upon environment Node.js

In trying to speed up my Node site, I've set up Amazon's CloudFront CDN to cache all static files on my server. I've configured a subdomain alias so instead of writing src="/mysite.css", I can write src="https://cache.mysite.com/mysite.css", and it will fetch the css file from the cloud, instead of my server.
The problem I'm trying to solve is that I don't want to hard code all of my static files to direct to the cloud, because it will be very hard to further develop and test my site in the future. If I make a change locally to a css file, for example, and try to test it locally, the link to the css file will be directed to the cloud, not the local copy.
So I was trying to think of a way to rewrite the urls, conditionally on the environment. Is there a way to use the ENV file to set a variable, which will then be used to insert the cache url in front of all relative urls, or otherwise leave it blank so the link remains relative?
There's process.env[documentation] to get environment variable which you can then use in your code/templates.
You can also use modules like dotenv or config

Using IIs as it I would use Apache

I want to use IIS the way I use Apache. With that, I mean to, for example, create a simple html file, with only a "hello" message, put this file inside the IIS folder and then be able to access this html page thru eg.: localhost/mypage.html.
I can't figure it out how to make this. I've searched on Google, but nine has helped me.
My doubts are:
The IIS server is turned on, I saw this on the IIS Manager. So, what are the folder that I should place my html file and what are the default port that IIS uses so I can access my html file via localhost?
Create a new website and point to the folder where your html file resides
GO to IIS Manager->Right Click on Sites -> Add Website
Are you getting the localhost default screen
Restart Your server as whole,
See if the IIS Worker Process is running on the task manager,

Is it possible to export an Orchard Theme without using the command line?

I have next to no experience with Orchard, or .NET in general for that matter, but I have agreed to do some development on an existing Orchard website.
I have an admin-login with access to the Dashboard and I have an admin-login at the hosting provider (Arvixe). I've started moving the site over to Azure so I can use that as a staging environment.
I've successfully exported all the content, but the site is also running a custom theme that I also need to move over. From what I gather the only way to package that theme is using the command line interface, but I can't find a way to run the command line executable via the hosting provider's web interface (I haven't been able to connect to it with SSH).
Is there any way to run what is usually command line operations via the Dashboard? Some kind of module that I have not discovered? Is there any way of moving a theme from one installation to another without using the command line?
If you have access to the Arvixe account, you also have access to ftp. Do that, then look under the Themes directory. Copy the theme's folder. What's the web site?

Coldfusion security issue...how to hide directory of files?

So, I decided to try to break my website...I googled my site by typing in site:mysite.com/whatever and behold, all of the users uploaded files were available for view under a specific directory.
What kind of script/ counter measure should I use to block these files from being viewed? I already have a script that checks the path and the logged in status, however this doesn't seem to be working. I've looked all over for solutions...but I can't quite find one. I'm using ColdFusion 8.
This isn't a ColdFusion issue so much as a web server configuration issue.
You should either:
configure your web server not to show a directory of files when using a URL without a filename (e.g., http://www.example.com/files/)
drop a blank default web document (index.html, index.htm, default.htm, index.cfm, whatever) into that directory so that it displays that document rather than the list of files. If you use index.cfm, it'll fire your Application.cfm/cfc in your file path and use whatever other security you've built.
(or, better, do both)
The best way to secure your file listings and the files themselves is to store them in another folder outside of the Web site root folder. You can then serve them up using CFDIRECTORY and CFCONTENT. The pages that display the files can check your access controls and only serve the files to those allowed to see them.

Is there a module or simple way to allow the cc.net.config file to be seen from the webdashboard?

I'd like to be able to have either web dashboard logged in administrators or general users depending on which the team prefers be able to see the contents of this file without remoting into the box, is this possible using the webdashboard?
This is not an answer to how it can be seen from the web dashboard...
... but it is possible to store the ccnet.config file in source control and set up a special build on the build server that automatically retrieves the newest config file.
This way you do not even have to remote into the box in order to edit the contents of the file.
See more details in the documentation:
http://confluence.public.thoughtworks.org/display/CCNET/Configure+CruiseControl.Net+to+Automatically+Update+its+Config+File

Resources