Publishing 1C on IIS and Apache: step by step and common errors
Checkcraft is a desktop app for checking APIs and logs without code, with a free edition. Download, no sign-up →
Publishing links a web server to a 1C database: after it the database opens in a browser and HTTP services answer under /hs/. You need three things: an IIS or Apache web server, a 1C web extension module of the same bitness, and the publication itself from the Designer or with webinst. Below are the steps, checks and errors.
What you need before publishing
A web server: IIS on Windows or Apache 2.4 on Windows and Linux. The web server extension module installs with the 1C platform and must be selected during setup. The module and web server bitness must match: a 64-bit Apache will not load a 32-bit module. For IIS enable the ISAPI components.
Publishing from the Designer
Run the Designer as administrator and open Administration and Publish to web server. Set the publication name, which becomes part of the address, choose the web server and folder. Tick what to publish: client application access, HTTP services by default, and web services and OData if needed.

How to check the publication works
Open http://server/publication_name in a browser: the database should load in the web client. Check an HTTP service with a request to http://server/publication_name/hs/root_url/... using curl or an API client. If the browser opens the database but /hs/ returns 404, HTTP services are not published.
Publishing with webinst
# IIS, база на сервере 1С
webinst -publish -iis -wsdir trade -dir "C:\inetpub\wwwroot\trade" -connstr "Srvr=srv1c;Ref=trade;"
# Apache 2.4 на Linux
webinst -publish -apache24 -wsdir trade -dir "/var/www/trade" -connstr "Srvr=srv1c;Ref=trade;" -confpath /etc/apache2/apache2.confwebinst lives in the platform bin folder. Run it as administrator. Handy for headless servers and repeatable scripted publishing.

Common publishing errors
| Symptom | Cause | Fix |
|---|---|---|
| Apache fails to start after publishing | 1C module and Apache bitness differ | Install the matching module or another Apache |
| 500 when opening the address | The web server user lacks rights on the 1C bin or publication folder | Grant read and execute |
| 404 on /hs/ | HTTP services are not published | Tick HTTP services and publish again |
| The browser asks for a login and rejects it | No 1C user with rights or the wrong auth mode | Check the user and sign-in method |
| Worked, broke after a platform update | The publication points to the old module version | Republish with the new version |
Publication security
- Do not publish a database to the internet without HTTPS and a real need.
- Create a separate 1C user with minimal rights for HTTP services.
- Restrict network access to the publication if the service is internal.
- Check the response without auth: it must be 401, not data.
Testing a published service with requests is covered in 1C HTTP service.
More on 1C
Section overview and all guides: 1C integration via API: options, architecture and examples.
- JSON in 1C:Enterprise: read, write, HTTP requests and common errors
- Unexpected character when reading JSON in 1C: causes and fixes
- Structure, Array and ValueTable to JSON in 1C: both directions
- Data exchange in 1C: methods, formats, setup and checks
- Integrating 1C with a website and online store: options and pitfalls
Frequently asked questions
How do I publish a 1C database on a web server?
Install IIS or Apache and the 1C web extension module of the same bitness, then in the Designer as administrator open Administration, Publish to web server, and set the name, folder and what to publish.
Why does Apache fail after publishing 1C?
Usually the 1C module and Apache bitness differ.
Why does the HTTP service return 404?
HTTP services were not ticked when publishing.
Repeat this on your own API
Checkcraft is a desktop app that saves API response checks without code and shows what did not match. Start with a sample, then use your own sanitized data. Free runs on Windows and Linux with no time limit.
Download FreeDownload and first runNo sign-up or email needed, the archive is ready in a couple of minutes. See the edition limits.
Start with the linked example and compare its result with your own test requirement.