投稿日:
確認環境
| Env | Ver |
|---|---|
| Windows | 10 pro |
| PHP | 8.0.2 NTS Visual C++ 2019 x64 |
| nginx | 1.19.8 |
手順
nginx.confを開きFastCGI server listening on 127.0.0.1:9000辺りに次の設定をする
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME C:/nginx/html/$fastcgi_script_name;
include fastcgi_params;
}
- 設定したフォルダに
.phpファイルを配置 nginxを起動php-cgi.exe -b 127.0.0.1:9000.phpファイルにアクセス
サービス化する
- winswを使うとできるらしい
投稿日:
%HOMEPATH%.ssh\configに以下のように設定すると踏み台サーバーを経由したSSH接続が可能- 設定は踏み台には証明書認証があるが、宛先にはないケースを想定
ssh target-host.devとすると踏み台経由でアクセス可能ProxyCommandではssh.exeをフルパスで記述する必要がある
# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host proxy.ssh-host.dev
HostName proxy.ssh-host.dev
User foo
IdentityFile C:\Users\user-name\.ssh\id_rsa
ForwardAgent yes
Host target-host.dev
Hostname target-host.dev
User bar
ProxyCommand C:\Windows\System32\OpenSSH\ssh.exe -l %r -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null proxy.ssh-host.dev -W %h:%p
投稿日:
- microsoft.comからWindows用のドライバを落としてきて適当な場所に展開する
- コマンドプロンプトで
php -r "phpinfo()" > phpinfoする - 上記で吐き出した結果を
Threadで検索、Thread SafeかUnSafeか調べる - 落としてきたドライバからバージョンとThreadが合うものを探して
php\extに配置 php.iniのDynamic Extensionsセクションに次のような感じで記述
# php_と.dllは勝手に補完される
extension=pdo_sqlsrv_74_ts_x64
extension=sqlsrv_74_ts_x64
php -r "phpinfo()" > phpinfoしてsqlsrvが確認できたらOK