Multi-Site error configured for different ports

Source: Internet
Author: User
Configuring multiple sites on different ports: php + apache + mysql
The configuration of multiple sites with different ports is as follows (only modified in http. conf)
NameVirtualHost *: 80
NameVirtualHost *: 81
NameVirtualHost *: 82

# 1st websites are used to run company websites

DocumentRoot "D:/myweb /"
ServerName oa
Php_value include_path ".; D:/myweb"


# 2nd websites are used to run OA

DocumentRoot "D:/myoa/webroot /"
ServerName oa
Php_value include_path ".; D:/myoa/webroot"


# 3rd sites are used to run independent forums

DocumentRoot "D:/bbs /"
ServerName oa


Listen 80
Listen 81
Listen 82

In any case, 80 81 82 points to D:/bbs /. Why is the error because different ports are not directed to different websites? how can I modify it?
(In some articles, we will create a new http2.conf modification. what is the difference between this method and the above)


Reply to discussion (solution)


ServerAdmin admin@xxxx.com
DocumentRoot "path"
ServerName localadm
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common


Add a few pieces like this

Httpd2.conf does not need to be added in the same httpd. conf ??

Now I have more Listen 200 and Listen 8080, but both point to the 8080 position. The settings are as follows:
01. # Listen 12.34.56.78: 80

02. list 8080

03. List 200

04.

05 .#

06. # Dynamic Shared Object (DSO) Support

07 .#

08. # To be able to use the functionality of a module which was built as a DSO you

09. # have to place corresponding 'loadmodule' lines at this location so

10. # directives contained in it are actually available _ before _ they are used.

11. # Statically compiled modules (those listed by 'httpd-L') do not need

12. # to be loaded here.

13 .#

14. # Example:

15. # LoadModule foo_module modules/mod_foo.so

16 .#

17. LoadModule actions_module modules/mod_actions.so

18. LoadModule alias_module modules/mod_alias.so

19. LoadModule asis_module modules/mod_asis.so

20. LoadModule auth_basic_module modules/mod_auth_basic.so

21. # LoadModule auth_digest_module modules/mod_auth_digest.so

22. # LoadModule authn_anon_module modules/mod_authn_anon.so

23. # LoadModule authn_dbm_module modules/mod_authn_dbm.so

24. LoadModule authn_default_module modules/mod_authn_default.so

25. LoadModule authn_file_module modules/mod_authn_file.so

26. # LoadModule authz_dbm_module modules/mod_authz_dbm.so

27. LoadModule authz_default_module modules/mod_authz_default.so

28. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so

29. LoadModule authz_host_module modules/mod_authz_host.so

30. LoadModule authz_user_module modules/mod_authz_user.so

31. ## LoadModule autoindex_module modules/mod_autoindex.so

32. # LoadModule cern_meta_module modules/mod_cern_meta.so

33. LoadModule cgi_module modules/mod_cgi.so

34. # LoadModule dav_module modules/mod_dav.so

35. # LoadModule dav_fs_module modules/mod_dav_fs.so

36. # LoadModule deflate_module modules/mod_deflate.so

37. LoadModule dir_module modules/mod_dir.so

38. LoadModule env_module modules/mod_env.so

39. # LoadModule expires_module modules/mod_expires.so

40. # LoadModule file_cache_module modules/mod_file_cache.so

41. # LoadModule headers_module modules/mod_headers.so

42. LoadModule imagemap_module modules/mod_imagemap.so

43. LoadModule include_module modules/mod_include.so

44. # LoadModule info_module modules/mod_info.so

45. LoadModule isapi_module modules/mod_isapi.so

46. LoadModule log_config_module modules/mod_log_config.so

47. LoadModule mime_module modules/mod_mime.so

48. # LoadModule mime_magic_module modules/mod_mime_magic.so

49. LoadModule proxy_module modules/mod_proxy.so

50. # LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

51. # LoadModule proxy_balancer_module modules/mod_proxy_balancer.so

52. # LoadModule proxy_connect_module modules/mod_proxy_connect.so

53. LoadModule proxy_http_module modules/mod_proxy_http.so

54. # LoadModule proxy_ftp_module modules/mod_proxy_ftp.so

55. LoadModule negotiation_module modules/mod_negotiation.so

56. LoadModule rewrite_module modules/mod_rewrite.so

57. LoadModule setenvif_module modules/mod_setenvif.so

58. # LoadModule speling_module modules/mod_speling.so

59. # LoadModule status_module modules/mod_status.so

60. # LoadModule unique_id_module modules/mod_unique_id.so

61. LoadModule userdir_module modules/mod_userdir.so

62. # LoadModule usertrack_module modules/mod_usertrack.so

63. # LoadModule vhost_alias_module modules/mod_vhost_alias.so

64. # LoadModule ssl_module modules/mod_ssl.so

65.

66.

67.

68. ServerName "web"

69. DocumentRoot "d:/php/wnfenlei"

70.

71. Options Indexes FollowSymLinks

72. AllowOverride None

73. Order allow, deny

74. Allow from all

75.

76.

77.

78.

79. ServerName "web"

80. DocumentRoot "d:/php/wnarticle"

81.

82. Options Indexes FollowSymLinks

83. AllowOverride None

84. Order allow, deny

85. Allow from all

86.

87.

How to configure Apache multi-port and multi-site

I am a self-built apache from an oa vendor (non-independently installed apache is prohibited from installing other apach ).
No conf/extra/httpd-vhosts.conf above
(It is similar to the one in which all binary data is not installed in wamp mode)
Otherwise, the first post mentioned (only modified in http. conf)
As mentioned above ?? (Do you need me to find another matching httpd-vhosts.conf?
?)

Httpd-vhosts.conf is self-written, not provided by apache, simply put, similar to the php include
Didn't take effect, didn't you restart apache?

It is still not possible to restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.