URL Rewrite Deploy to Production Server - iis

I've finished url dynamic rewrite module on my local computer, iis, everything is working but I have to deploy it to the production server now, which will cause errors. Do you have any idea how to avoid them?
If you have done similar thing before...
Thanks in advance

You could create a copy of the production server in a virtual machine and try to deploy your rewrite rules there.
VirtualBox is a simple engine to create a VM.

I do mine within a test vm environment then make my edits to the Production Site off hours to avoid the IIS Restart when saving rules.
If you want to move them up in one piece I have thought of making the edits to the machine.config file but after some discussions with our IT group found that was not a workable solution. Editing the rules on the Web Servers then testing them after being added is the course I have followed so far.

Related

Can I copy my webapp folder in htdocs to an nginx directory to make it work there?

I use XAMPP, all of the files necessary for my web app to work is in a single folder in htdocs. I need to move these to my linux vm which uses nginx. Is it possible to just copy the folder to make it work on the nginx web server? Can I also do the same for the database since it uses PHPMyAdmin?
FYI: I have to compare and report the performance difference between 2 WAF (Web Application Firewall), I have used ModSecurity, but unfortunately I cant find the second one which works on Windows (I barely have experience using other OS), so I changed the idea to comparing the performance of ModSecurity on NGINX vs APACHE. I've tried other WAF but I can't implement them on my website because it has to be local.
If this doesn't work, I probably have to compare ModSecurity performance on Windows vs on Linux, because I really have to compare performance of WAF within 2 conditions.
I would really appreciate your input, thanks.

I tried to setup Gitlab pages and it broke the VM?

I have been running a gitlab instance and today I was trying to setup the pages function. I followed the gitlab guides and google cloud docs, it seems my config file got corrupt or broke (by me ofc) and even the ssh was down (directly on google console) till I rebooted the VM. Now I'm able to see that the instance is working on the shell but can't get it back online, I have 3 options here, 1) I wait a day or so to see if this is a domain/dns issue, 2) keep trying to a recover the gitlab that only had 3 users and no projects, or 3) make a fresh one and try to setup everything well from the start. The only things bothering me is losing 2 users that came to my project organically.
What can I do here? I'm trying to fix the config file but at the same time I don't know if its a domain issue because I had to change some dns configs to set the subdomain. The only thing I cannot understand really is how or why did my shell went down for at least a hour after I changed the configurations for gitlab. And btw are snapshots the right way to make backups with gcloud ?
What can I do here?
Undo your changes; in other words, put things back they way they were before, when the system was working. To do that, you have to know exactly what you changed.
If you are not keeping your config file in version control, you should start to do that, as that will make it easier to track and control your changes.
I decided to answer my question since I know how this problem occurred and it may occur for others.
Conditions:
Have a Gitlab self hosted.
Try to setup DNS settings for Gitlab Pages and the URL stop
responding even if the Gitlab instance still runs on the machine.
Here we can see the problem was in the DNS setup.
In my case I setup different DNS cases in my DOMAIN service DNS settings. Instead this DNS setup have to be made in your HOST/SERVER side.
To properly make a Gitlab DNS:
the wildcard domain *.mydomain.com type A should be on the server config, in my case gcloud DNS. Find out the software you use for your main machine server config.
Its good practice to setup the domain and server without redirection and set the proper DNS on the DOMAIN settings. This way your domain will resolve the subdomains without need for redirection on the DOMAIN settings. Once you set a wildcard type A record you can or cannot make the subdomain as a CNAME example, subdomain.mydomain.com. or you can use a separate IP for the subdomain with a type A record.
In summary, when setting up Gitlab Pages DNS do not change your DOMAIN settings, change your SERVER DNS settings.

URL rewriting in IIS for a php/linux guy

I'm a PHP/linux guy....
One of my customers came to me with an existing website/hosting package....
The hosting is windows (but with PHP.....I don't know, it just is)
I need to learn how to rewrite URLs in IIS..
I understand you usually do it with a separate thing you install, called url rewrite module?....Or, is there an equivalent of the .htaccess file which i can place in the root folder?
If yes, is this something that I should expect the hosting company to already have installed?
Is it done in PERL regex in IIS?
Please HELP.
I can't change the hosting comapny or any variables (windows/linux) in the current hosting as my customer cannot have a second where the site is down...so i need to know how to rewrite urls in windows/IIS
I am willing to learn little things like this anyways, for future situations...
It's IIS 7...windows 2008 and PHP...
I don't know if it's against rules to mention names of companies...please don't grill me if it is, just giving as much info as possible and maybe someone will have the same experience as me....
its fasthost..
Thanks
If you have access to the server / IIS then you can install http://www.iis.net/downloads/microsoft/url-rewrite
This will add a module where you can configure rewrites and redirects.
If you dont have access to the server / IIS and this module is installed then each web root will have a web.config file which contain the rules and other IIS configurations. You will have to contact the hosting company to see if the module is installed. It usually is.
This page gives an overview of both:
http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

Directory Listing Denied in Orchard

I have a new Orchard site which successfully runs the setup and database configuration when running locally. But when I tried to deploy it to the actual server and point a browser to the site, I get a "Directory Listing Denied" error.
Anyone seen this and fixed it?
I figured it out. Running on a shared web server, if IIS is configured for my site to use the default app pool, Orchard is precluded from reading its own files. (Remember that Orchard uses libraries and needs deep read/write access to subdirectories).
So the solution was simply to configure the site to run in its own isolated application pool.
Looks like this on my site's control panel:
Hope this solution helps someone down the line.
My guess is that you deployed the whole source code instead of src/orchard.web.

Is it ok to copy a domain in weblogic in situations where we need to have the same configuration for dev/testing purposes?

I am aware of weblogic templates, but out of curiosity I wanted to know, Is it ok to copy a domain in weblogic in situations where we need to have the same configuration? I have already done the same and have been successful in testing my application.
You can get away with doing this, but there are a couple of more reliable (and scriptable) ways to migrate the same configuration through the development team, or to create new deployment environments.
The domain template builder lets you build your own custom domain template from an existing domain: http://download.oracle.com/docs/cd/E13179_01/common/docs92/tempbuild/starttb.html
There's a couple of ways to get it done with WLST, as well:
You can use configToScript to spit out an entire WLST script (and properties file) to recreate the exact configuration you've got, or...
You can use readDomain and writeDomain in offline mode to recreate an existing configuration in a new domain:
readDomain: http://download.oracle.com/docs/cd/E13222_01/wls/docs92/config_scripting/reference.html#wp1003638
writeDomain: http://download.oracle.com/docs/cd/E13222_01/wls/docs92/config_scripting/reference.html#wp1003688
It's okay to copy the domains over and it worked exceptionally well prior to WebLogic 9.2. However, there are some weird bugs that pop up for versions that are using the portal for the console.
Also, after copying the file you would want to make sure that all listen addresses and ports have been modified accordingly so that your local managed server doesn't attempt to connect to the production administration server on startup.

Resources