IMPORTANT: Backup your nginx site configs (usually under /etc/nginx/sites-available
)!
Remove old nginx incl. nginx-common:
apt-get autoremove --purge nginx nginx-common
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem | |
chmod 600 id_rsa.pem |
error_page 400 404 405 =200 @40*_json; | |
location @40*_json { | |
default_type application/json; | |
return 200 '{"code":"1", "message": "Not Found"}'; | |
} | |
error_page 500 502 503 504 =200 @50*_json; | |
location @50*_json { |
# Python 2.6's urllib2 does not allow you to select the TLS dialect, | |
# and by default uses a SSLv23 compatibility negotiation implementation. | |
# Besides being vulnerable to POODLE, the OSX implementation doesn't | |
# work correctly, failing to connect to servers that respond only to | |
# TLS1.0+. These classes help set up TLS support for urllib2. | |
class TLS1Connection(httplib.HTTPSConnection): | |
"""Like HTTPSConnection but more specific""" | |
def __init__(self, host, **kwargs): | |
httplib.HTTPSConnection.__init__(self, host, **kwargs) |
... | |
ssl_stapling on; | |
ssl_stapling_verify on; | |
ssl_trusted_certificate /usr/share/ssl/cert/rapidssl.pem; |
#! /bin/bash | |
# | |
# Diffusion youtube avec ffmpeg | |
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
VBR="2500k" # Bitrate de la vidéo en sortie | |
FPS="30" # FPS de la vidéo en sortie | |
QUAL="medium" # Preset de qualité FFMPEG | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json" |