Home
Installing DNN with Plesk and IIS7.x 2008r2
- Details
Dot net nuke has a few caveats when installing on a server. If you are running a medium trust environment or you want a secure set up then you need to do it right.
In Parallels Panel (Plesk) create your customer and domain.
Now set up a MSSQL database for your DNN install. Make sure you get keep a copy of DB name, db user and password you give it. You will need it for the install script.
Before you run the setup you have to make 1 temporary crucial change.
In windows go to the clients httpdocs folder and right click then properties. and click the security TAB. you should see something like this:
The User: Plesk IIS WP User(TEST\IWPD_99(changeme90)) is what we need to recreate. In your Case it will start with Plesk IIS WP User (blah blah blah(blah))
In this screen click Advanced then click Change Permissions
Now click Add: in the popup: Enter the Object Name put in: TEST\IWPD_99(changeme90) and click check name (use the name you have) click check name and it should become underlined then click ok. (if no underline then you misspelled somethng or got an extra ).
Now check Full control then click OK
You should see this:
Click OK again and the perms will be added.
You now have a new user with full control,.Now you can run the DNN setup and it will not fail.
You can remove this after the install or modify it''s perms to read/write/execute
Replace sendmail
- Details
1.) Install the MTA package on your Ubuntu 12.04 GNU/Linux box:
sudo apt-get install exim4-daemon-light
2.) Configure the MTA with this command and steps, replacing somedomain.com with your mail domain name:
sudo dpkg-reconfigure exim4-config
- Set postmaster email:
This email address is being protected from spambots. You need JavaScript enabled to view it. - Select 'mail sent by smarthost; no local mail'
- Set somedomain.com at the "System mail name" screen
- Set defaults(hit enter) until you get to the step below
- Enter mail.somedomain.com for the "IP address or host name of the outgoing smarthost:"
- Set defaults all the way to the finish
That's it! exim4 should restart and you'll be ready to test. Now wasn't that easy?
Now check if the smtp server is listening on port 25 (smtp) with these terminal commands:
netstat -ano |grep :25
Should see something like:
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN off (0.00/0/0)
Test the setup by sending an email to yourself from the Terminal:
echo "Yay - SMTP works" | mail -s "Test email"
Powershell Process memory checker
- Details
This is a simple script to check how much memory is using for a given process name
$oProcList=get-wmiobject win32_process | where{$_.name -eq "cgi.exe"}
$total=$NULL
foreach($item in $oProcList){
$mem=$item.workingsetsize
$total+=$mem
}
$rez=($total/1mb)
$rez
google search
- Details
var searchReturned = false; try { // #1 google.load('search', '1', {language : 'en'}); google.setOnLoadCallback(function() { var customSearchControl = new google.search.CustomSearchControl('XXXXXXXXXX'); customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); customSearchControl.setNoResultsString("Your search didn't return any results."); customSearchControl.setSearchStartingCallback(this, function(control, searcher, query) { // #2 searcher.setQueryAddition("inurl:<<searchPath>>"); searcher.setRestriction(google.search.Search.RESTRICT_EXTENDED_ARGS,{ "filter" : "0" }); }); customSearchControl.setSearchCompleteCallback(this, function(control, searcher){ $("#search_preload, .gs-no-results-result").hide(); $("#search_postload").show(); // #3 if($('.gs-spelling').length) { $('.gs-spelling a').html($('.gs-spelling a').html().replace(/inurl:.+/g,"")); } // #4 try { numResults=searcher.cursor.estimatedResultCount; $("#searchResultNum").text(numResults); var cpi = searcher.cursor.currentPageIndex; if (cpi < searcher.cursor.pages.length - 1) { $('#cse .gsc-cursor').append('<div class="gsc-cursor-page">Next</div>').click(function() { searcher.gotoPage(cpi + 1); }); } if (cpi > 0) { $($('#cse .gsc-cursor').prepend('<div class="gsc-cursor-page">Previous</div>').children()[0]).click(function() { searcher.gotoPage(cpi - 1); }); } } catch(e){} window.scrollTo(0,0); searchReturned=true; }); var options = new google.search.DrawOptions(); options.setInput($('#search-box-input')); options.setDrawMode(google.search.SearchControl.DRAW_MODE_TABBED); customSearchControl.draw('cse', options); // #5 customSearchControl.execute('<<query>>'); }, true); } catch(err) {} // #6 setTimeout(function(){ if(!searchReturned && $('#cse').length == 0) $("#search_preload").html("<h2 style='color:red;'>There was an error performing your search, please try again later.</h2>"); }, 10000);
If you're using the Custom Search Element, find this line in your code:
customSearchControl.draw('cse', options);
Above that line, add this code:
customSearchControl.setSearchStartingCallback(this,
function(control, searcher, query) {
searcher.setQueryAddition('-inurl:https');
});
make sure you add this to the result section of your page not the form box.
Page 28 of 40