Узел карты js приложение к URL соединяет каналом в Apache

Походит на интересную задачу. Я имею, ничего не видели точно как это, и я не могу вообразить различие между http и https, который вызвал бы это.

Лучший способ диагностировать это состоит в том, чтобы разломать его на самые маленькие возможные части. Некоторые возможно предложения:

  • Попытайтесь отключить сжатие на поле IIS6, чтобы видеть, разрешает ли это его
  • Попытайтесь отключить кэширование, это - возможность
  • Проверьте Event Viewer на любые подсказки
  • Попробуйте простые .htm страницы или вызов изображений непосредственно
  • Попробуйте различные сайты или пулы приложений на поле IIS6, чтобы видеть, повторяется ли проблема
  • Удостоверьтесь, что нет прокси никакого типа, или IDS или любого другого слоя, который может помешать
3
задан 12 March 2014 в 10:22
1 ответ

I'm gussing that http://example.com/styles/4742a4e8.main.css is actually a file on your node JS application, so refers to http://localhost:8080/styles/4742a4e8.main.css, but is being reference in the index.html from your node app as /styles/4742a4e8.main.css

With the proxy mapping what is happening is that when you request

http://example.foo/foo/ it's sending a request which is returning http://localhost:8080/index.html as is. Any references within index.html aren't modified, so when the browser requests componenets it's requesting http://example.com/styles/4742a4e8.main.css but the file is only really accessible via http://example.com/foo/styles/4742a4e8.main.css

if /styles/ isn't used within example.com you could add

ProxyPass /styles http://localhost:8080/styles
ProxypassReverse /styles http://localhost:8080/styles

But this may become cumbersome if you have lots of directories.

Another approach would be to use relative paths on your node app. So instead of index.html referencing /styles/4742a4e8.main.css it referenced styles/4742a4e8.main.css (no leading slash). This might become cumbersome with nested paths in your node app.

A further solution may be to modify your node.js app to be fully run under localhost:/foo so the directory mapping is the same.

I'm not sure any of these solutions are ideal for your use case, but they will hopefully point you in the right direction.

3
ответ дан 3 December 2019 в 06:34

Теги

Похожие вопросы