윈도우 아파치 + python .py 파일 작동
페이지 정보

본문
http.conf
1. 모듈 주석 풀기
LoadModule cgi_module modules/mod_cgi.so
2. DocumentRoot 에서, <Files ~~ 추가하기
<Directory "d:/www">
<Files "*.py">
Options ExecCGI
AddHandler cgi-script .py
</Files>
</Directory>
3. httpd 재시작하기
4. sample.py
=============================================
#!python
print("content-type:text/html; charset=utf-8\n")
print("aaa")
=============================================
5. 브라우저로 접속확인하기
- 이전글모스키토 mosquitto - mqtt 서버 20.06.05
- 다음글tasklist 를 이용하여 실행되는 프로세서 확인하기 21.04.13
댓글목록
등록된 댓글이 없습니다.