Can i set an Website's App Pool in IIS using the bat file or any other scripts?
You could run msdeploy.exe and pass in parameters and set the AppPool as follows something like this:
msdeploy.exe
-verb:sync -source:appHostConfig="Default Web Site"
-enableLink:AppPoolExtension
-dest:package=site.zip
-declareParam:name="Application Pool",
defaultValue="Default Web Site",
description="Application pool for this site",
kind=DeploymentObjectAttribute,
scope=appHostConfig,
match="application/#applicationPool"
You can use powershell:
import-module WebAdministration
Set-ItemProperty 'IIS:\Sites\Default Web Site' ApplicationPool NewAppPoolName
Related
Configure automatic domain join, automatic computer naming, and place new computer accounts in the appropriate organizational unit (OU).
Receive a Deploy request from the reference computer and deploy the install image using PXE and network installation.
this is what I have to do after I configured the active directory and create the users and peppered the WPS server in windows server 2016 but I have no idea what is this or how to do it any think for help please.
• You can achieve the three things, i.e., joining the computer to domain, placing it in an OU and renaming the computer system through a single script but the other two tasks as stated by you, i.e., receive a deploy request from the reference computer and deploy the install image using PXE and network installation should be done afterwards. For the other two tasks, you can configure a Windows Deployment Services server and deploy an image to be deployed to the respective networks, while also enabling PXE in it and the DHCP server scope also.
• Please find the below script to join the computer to a particular OU and rename it thereafter. Create a ‘.csv’ file containing the current names of the computers to be joined to the domain and renamed. Then run the below script on each computer individually: -
‘ Enable-PSRemoting -SkipNetworkProfileCheck -Force ’ --> After running this cmd locally on each computer, run the below script from a domain controller as it will connect remotely through powershell to each computer and join it to domain
‘ Import-Module ActiveDirectory
$inputFilePath = <Path of the csv file>
$computers = Get-Content -Path $inputFilePath
$domain = <domainname>
$credentials = Get-credential -username <domain admin username> -password <password>
foreach ($computer in $computers)
{
$ScriptBlock = {Param($computer)
Add-Computer -DomainName $domain -ComputerName $computer -newname <NewComputerName> -OUPath “OU=testOU,DC=domain,DC=Domain,DC=com”-Credential $credentials -Restart -Force
}
$session = New-PSSession -ComputerName $computer
Invoke-Command -Session $session -ScriptBlock $ScriptBlock -ArgumentList $computer
Remove-PSSession -Session $session
} ’
• For deploying an image through WDS after domain joining through PXE, refer the following link: -
https://www.microsoftpressstore.com/articles/article.aspx?p=3089351&seqNum=4
I'm fairly new to working with live projects.
My project runs perfectly on localhost, I deploy the exact same copy to google app engine using the command gcloud beta app deploy.
My welcome page works perfectly:
As Well as my auth pages:
straight after the auth process i get the following response:
To verify that the account has been authenticated my route url is redirecting to the dashboard:
example.com/admin/users
my app.yaml file is as follows:
runtime: php
env: flex
runtime_config:
document_root: public
# Ensure we skip ".env", which is only for local development
skip_files:
- .env
env_variables:
# Put production environment variables here.
APP_LOG: errorlog
APP_KEY: App-key
STORAGE_DIR: /tmp
CACHE_DRIVER: file
SESSION_DRIVER: file
## Set these environment variables according to your CloudSQL configuration.
DB_HOST: localhost
DB_DATABASE: lara
DB_USERNAME: root
DB_PASSWORD: password
DB_SOCKET: /cloudsql/connection-name
MAIL_MAILER: smtp
MAIL_HOST: smtp.mailtrap.io
MAIL_PORT: 2525
MAIL_USERNAME:username
MAIL_PASSWORD: password
MAIL_FROM_ADDRESS: from#example.com
MAIL_FROM_NAME: {App-Name}
#we need this for the flex environment
beta_settings:
# for Cloud SQL, set this value to the Cloud SQL connection name,
cloud_sql_instances: connection-name
Here is my log?
This is the view it is looking for:
My routes:
It's funny how small things create the biggest issues, took me over 3 weeks to resolve this issue.
As I was conducting research I discovered that Google App engine is case sensitive and so here are steps I used to resolve this issue:
1st I checked my routes using php artisan route:list and my route is route: admin.users.index and my file structure was --path: views/Admin/Users/index.blade.php and so i change all my folders to lower-case to match the route.
Then I ran the following commands:
php artisan cache:clear
php artisan route:clear
php artisan view:clear
Lastly I added the following script under scripts on my composer.json file:
"post-install-cmd": [
"chmod -R 755 bootstrap\/cache",
"php artisan cache:clear"
]
Deployed using gcloud app deploy
Worked like a charm.
I developed an API in Lumen and deployed it on GAE. I followed this tutorial for that purpose. It worked fine until the deployment of API but the problem came when I tried to access the DB that is on the cloud-sql instance. I am unable to access the DB in the way described in the above mentioned tutorial. Then I tried the different solution and none of them work. At-last just for test purpose I added the Instances IP address (where the GAE is deployed) in the authorized list of the cloud-sql instance and its working now. But this is a temporary solution as Instances are deployed on VM's and their IP address can change at anytime that will break the connection between GAE and cloud-sql. Any solution or suggestion will be appreciated.
Although I have tried by changing my App.yaml multiple ways but still I have given it below:
runtime: php
env: flex
runtime_config:
document_root: public
# Ensure we skip ".env", which is only for local development
skip_files:
- .env
env_variables:
# Put production environment variables here.
#APP_ENV: production
APP_DEBUG: true
#QUEUE_DRIVER: sync
APP_LOG: errorlog
APP_KEY: 32 char key
STORAGE_DIR: /tmp
CACHE_DRIVER: database
SESSION_DRIVER: database
#APP_TIMEZONE: UTC
## Set these environment variables according to your CloudSQL configuration.
DB_HOST: 127.0.0.1
DB_DATABASE: dbname
DB_USERNAME: root
DB_PASSWORD: pass
DB_SOCKET: "/cloudsql/Instance Connection Name"
MYSQL_DSN: "mysql:unix_socket=/Instance Connection Name;dbname=dbname"
MYSQL_USER: root
MYSQL_PASSWORD: pass
beta_settings:
# for Cloud SQL, set this value to the Cloud SQL connection name,
# e.g. "project:region:cloudsql-instance"
cloud_sql_instances: "Instance Connection Name"
we are two people and i want my friend can use my local host but it is giving error
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
needless to say
we are using python 2.7 and appcfg.py cmd to run app
In order to access your sites using local address, either use RemoteDeskTop, or remotedesktop shaing by chrome .
if your friend is in same network then he can browse your application using your LocalIp address.
http://192.168.10.20/YourApplication.aspx
If your Local Ip is not accessible in other computers of same network, then change your network to Home Network, and Add allow your IIS in Firewall.
I am using Check_MK based monitoring on Nagios.
Check_MK Version: 1.2.0p4
OS: Linux
Nagios Core 3.2.3
I want to fetch the Nagios page of remote server to local server using MK Livestatus.
I am curious, How could I achieve this?
Nagios Check_mk Multisite (plugin)
This plugin allow user to view/manage distributed nagios using single Web based Interface.
However by default it doesn’t support pnp4nagios graphs (hosts/services from remote nagios) access using (single) Multisite URL.
To access PNP4nagios graphs of hosts/services from remote nagios using (single) Multisite URL, we need to Add Apache Proxy redirect setting.
multisite.mk Conf file-
This is my “check_mk/multisite.mk” conf file. (from Primary multisite Server (production server), SITE1 and SITE2 are two remote nagios)
OMD[production]:~$ cat etc/check_mk/multisite.mk
…
….
sites = {
#Primary site
“local” : {
“alias” : “PRODUCTION”
},
# Remote site
“SITE1″: {
“alias”: “SITE1″,
“socket”: “tcp:XXX.XXX.X.XX:6557″,
“url_prefix”: “/SITE1/”,
“nagios_url”: “/SITE1/nagios”,
“nagios_cgi_url”: “/SITE1/nagios/cgi-bin”,
“pnp_url”: “/SITE1/pnp4nagios”,
},
# Remote site
“SITE2″: {
“alias”: “SITE2″,
“socket”: “tcp:XXX.XXX.X.XX:6557″,
“url_prefix”: “/SITE2/”,
“nagios_url”: “/SITE2/nagios”,
“nagios_cgi_url”: “/SITE2/nagios/cgi-bin”,
“pnp_url”: “/SITE2/pnp4nagios”,
},
}
….
…..
OMD[production]:~$
After making the changes in multisite.mk file the MK Livestatus of remote nagios will be visible at local site.