Skip to content

Instantly share code, notes, and snippets.

@hisanari
Last active August 9, 2018 01:13
Show Gist options
  • Save hisanari/26296aeca1502bd9ad5fe6ef0a019302 to your computer and use it in GitHub Desktop.
Save hisanari/26296aeca1502bd9ad5fe6ef0a019302 to your computer and use it in GitHub Desktop.

###クロスドメイン
異なるドメイン間でAjax通信するとデータが取得できない。
オリジン間リソース共有(CORS Cross-Origin Resource Sharing)   https://developer.mozilla.org/ja/docs/Web/HTTP/HTTP_access_control

composerのコンテナを追加

nodejsのコンテナを追加

nginxメモ

http://nginx.org/en/docs/beginners_guide.html#conf_structure

  1. nginxでhtmlを動かす
FROM nginx
COPY static-html-directory /usr/share/nginx/html

docker build -t hogehoge-nginx .

docker run --name hogehoge-nginx -d -p 8080:80 piyo-nginx

http://localhost:8080で見れるはず!

  1. nginxでphpを動かす nginxの設定ファイルの中でrootの指定に気をつける。
@hisanari
Copy link
Author

hisanari commented Aug 7, 2018

peek 2018-08-07 14-39

@hisanari
Copy link
Author

hisanari commented Aug 9, 2018

peek 2018-08-07 14-39

@hisanari
Copy link
Author

hisanari commented Aug 9, 2018

peek 2018-08-09 10-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment