Solved. With this configuration in the MapProxy yaml file:
services:
wms:
srs: ['EPSG:3785', 'EPSG:4326', 'EPSG:23028']
image_formats: ['image/jpg', 'image/png']
layers:
name: mylayer
title: My layer
sources: [my_cache]
caches:
my_cache:
grids: [GLOBAL_MERCATOR]
sources: [my_wms_source]
format: image/png
request_format: image/png
sources:
my_wms_source:
type:wms
req:
url: http://ip_of_my_mapserver_machine/cgi-bin/mapserv?
layers: mylayer_in_mapserver
map: /path/to/my/mapfile.map
supported_srs:['EPSG:3785', 'EPSG:4326', 'EPSG:23028']
You are making a WMS version 3 request, which needs to use a CRS parameter while you are sending an SRS parameter.
So either use version 1.1.1 and an SRS parameter or change the SRS to a CRS.
In general the best practice is to allow the client code to negotiate the version with the server (so leave the version parameter out of the getCapabilitites request). Though with out checking the source of the leaflet plugin I can't say if this would work in this case.
Best Answer
The difference between WMS 1.1.1 and 1.3.0 is two fold.
CHANGE NO 1 - CRS/SRS Usage
Use SRS for 1.1.1
Use CRS for 1.3.0
CHANGE No 2 - WMS 1.3.0 ONLY
The order of parameters for BBOX depends on whether the CRS definition has flipped axes. You will see this in the GetCapabilities request at 1.3.0 - the response should show the flipped axes.
BBOX=xmin,ymin,xmax,ymax NON-FLIPPED
BBOX=ymin,xmin,ymax,xmax FLIPPED
I have made a list of EPSG codes that need to be flipped by creating a SpatiaLite 4.3.0 database and then saving this SQL request to file:
SELECT auth_srid, has_flipped_axes, ref_sys_name, axis_1_name, axis_1_orientation, axis_2_name, axis_2_orientation FROM "spatial_ref_sys_all" WHERE auth_name = "epsg";
You will then see that EPSG:4326 needs to have flipped axes.
4326 1 WGS 84 Latitude North Longitude East
THIS IS THE CORRECTED 1.3.0 REQUEST
Change is BBOX=24,-126,50,-66
http://mesonet.agron.iastate.edu/cgi-bin/mapserv/mapserv?map=/mesonet/www/apps/iemwebsite/data/wms/goes/conus_ir.map&SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&WIDTH=256&HEIGHT=256&FORMAT=image/png&TRANSPARENT=TRUE&BBOX=24,-126,50,-66&LAYERS=conus_ir_4km_900913,conus_ir_4km&CRS=EPSG:4326&STYLES&