Most publishers register the DOI at the item (article) level and not the galley level. Selecting the item/article level will use the URL for the Abstract landing page, which is appropriate for most publishers. The intention is for the DOI to be assigned to the complete article record with all associated files. In OJS 2 it is possible to register DOIs at the issue, item, galley, and supplemental article levels. In OJS 3 you can select to assign DOIs at the Issue, Articles, and Galley levels. You can configure these settings in Setup 4.3 for OJS 2 or DOI Plugin Settings for OJS 3. We do not assign DOIs to Issues or Galleys, but I assume that this will use the URLs for the Issue TOC and individual galley items, respectively.
I have just done some testing of this but have not tested it thoroughly. I tried to assign DOIs to only galley copies in OJS 3 so that I could see what URL is included in the CrossRef export, but it forces me to assign DOIs at the article level.
(Why is this optional in DOI Plugin Settings if it is required to complete the action? Error message: Plugin requirements not met: Articles are not selected for DOI assignment in the DOI public identifier plugin, so there is no deposit or export possibility in this plugin.)
I selected to assign both article and galley DOIs and created a galley copy with a remote URL as the only galley. The XML produced by OJS did not include that remote URL in the CrossRef XML output, but it did include a “new” URL that does point to the remote galleys. I included galleys with remote URLs to both an Abstract landing page and a remote PDF in my test. Both of these were included in the XML export, but they had transformed URL based on my OJS site URL even though entering them in a browser leads to the remote URLs.
I think that OJS is assigning the URLs appropriately for items that are published using OJS, but if a system is publishing content at a remote URL, then the remote URL entered should be what is used to generate the resource information in the CrossRef export (or an option included in the DOI Plugin Settings that says "Use remote URLs for items when available). There is currently a way to include a remote URL for galley copies in OJS, but I don’t believe there is a way to associate a URL on the Issue or Article level for items published elsewhere. (I could absolutely be wrong about this!) If the plugin were to be changed to use remote URLs when provided, it would need to be able to handle remote URLs for all possible items that receive a DOI.
So, my answer is that OJS is handling this correctly for content that is published using the system. The URL used for DOIs assigned to articles SHOULD be the abstract landing page and not a galley (unless the DOI is specifically being assigned to a galley).
OJS does allow for you to enter a remote landing page for the galley file in the system, but it doesn’t use that URL in the CrossRef XML export (though that URL does redirect to the correct remote page).
The remote galley URL should be used as the primary DOI resource when you are assigning a DOI to that galley copy; however, as is most often the case, if you are assigning the DOI on the article level, the galley URL should be included as an item resource but not the DOI resource.
I did not end up where I thought I would when I started looking into this, so please let me know if you have questions, if you would like me to do some more testing/research, or if I left parts of the topic unanswered.