Tag Archives: http

webserver market share and how to implement HSTS from @netcraft #sysadmin #security

webserver market share (Jul 19 –  nginx 35%, apache 27%, m$ 14%, goog 2%)

how to implement HSTS (Jul 19 – HTTPS webservers that are vulnerable 95%)

apache2 listen ports are now in a separate file

in apache2 the server listen ports are now in a separate file so to add a site on port :8000 you need to add 8000 to /etc/apache2/ports.conf AND add a <VirtualHost *:8000> to  yoursite.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80
Listen 8000

 

 

#webdev #python curl #http post requests

webdev python curl http requests

simple python curl http post request example

import requests
url = 'https://www.example.com/'
data = {'requestXml': '<MYREQUESTXML>'}

r = requests.post(url, data)

print 'U '
print url
print 'S '
print r.status_code
print 'H '
print r.headers
print 'T '
print r.text