For the sake of convenience let’s start with the assumption that your population will desire a North American urban population density and a globally averaged diet.
The city of Austin TX has approximately 1,000,000 residents and a surface area of approx. 800 km^2, for a density of about 1,250/km^2.
The City of New York (5 boroughs) NY also has a surface area of approx. 800 km^2 but a population of approx. 8.5 million, for density of about 10,500/km^2.
However the density of the Manhattan borough is close to 28,000/km^2. That is the highest density population center in North America with a population of at least 1 million and possibly near the limit of Western cultural tolerance (or we could reasonably expect it would be even higher by now). For our purposes let's say a few more people can be squeezed in to conveniently round the figure to 30,000/km^2.
So the station would need at least 1,000,000/30,000 km^2 of surface area (assuming living structures are approx. as multidimensional and compacted as Manhattan), or 33.3 km^2. Since much of the surface of Manhattan is pavement for cars, and we'll assume that citizens of space will have learned to do without that kind of freedom, let's then shave 10% off of the requirement for a nice rounded living space of: 30 km^2.
For food production usage, let's take the conservative approach of using globally averaged statistics since they're easy to find. According to one source (https://ourworldindata.org/yields-and-land-use-in-agriculture) approx. 50% of habitable land on earth, or 104M km^2, is used for agriculture. Of that 77% is used for livestock and 23% for crops. Let's now take the somewhat controversial liberty of assuming that 0% of your station's residents will derive calories/protein from livestock simply because farming livestock is so incredibly inefficient and, generally, sufficient non-livestock alternatives exist. 23% (crops only) of earth's agriculture equates to 11M km^2.
Now let's assume that the earth's population is a rounded 8,000,000,000 (in the near future). Let's also assume (quite ridiculously - this is a fictional model) that all of earth's population has equal access to earth's total yield of crops and there is 0% wastage. That means it takes 11M km^2 of crop surface area to feed 8,000,000,000 people, or approx. 725 people per km^2.
So a population of 1,000,000 would need close to 1,400 km^2 of crop surface area, using modern terrestrial practices of course.
As you can see the ratio of this area to living space of 30 km^2 makes the latter insignificant.
However I believe it's reasonable to assume that necessity would be the mother of invention when it comes to occupying space and crop yields / km^2 could be greatly increased over terrestrial norms. Let's be incredibly inventive and say efficiency could be increased by a full order of magnitude. Then you're down to 140 km^2. Much more plausible.
So at this point we have:
140 km^2 for crop production and 30 km^2 for living space, for a total of 170 km^2.
That means if your station's structure was a cylinder 2 km wide it would have a height of 26 km. To put this in perspective Manhattan is about 22 km long.
Now consider this. What if the station wasn't divided into urban/rural areas like on earth but was instead all rural with the residents living "off the land". In that scenario the station could be significantly smaller and perhaps even a more pleasant habitat.
[Corrected cylinder calculation.]