I want to serve a specific documentroot on port 8000
I tried creating a .conf file in /etc/httpd/conf.d:
Listen 8000
<VirtualHost *:8000>
DocumentRoot "/newwebroot"
</VirtualHost>
On nginx this is relatively simple, you just define a server block for the port and webroot, on Apache nothing I tried seems to be working.
I can see httpd listening on port 8000, so that is working, it just shows the main test page from /var/www/html/
Please note, it is supposed to be working using the server IP, not a domain, hence leaving out the ServerName directive.
CentOS / Apache 2.4
നിങ്ങളുടെ conf.d
പ്രമാണ റൂട്ട് / ന്യൂവെബ്രൂട്ട്
അല്ല / var / www / newwebroot
അത് ശരിയാണോ?
നിങ്ങൾ ആ ഫോൾഡർ പരിശോധിച്ചിട്ടുണ്ടോ? ഉടമ-അനുമതികൾ? നിങ്ങൾ അപ്പാച്ചിയുടെ ലോഗുകൾ പരിശോധിച്ചിട്ടുണ്ടോ? എന്തെങ്കിലും പിശകുകൾ ഉണ്ടോ?
ഇത് പ്രവർത്തിക്കുന്നതായി തോന്നുന്നു:
Listen 8000
<VirtualHost *:8000>
DocumentRoot "/newwebroot"
<Directory /newwebroot>
Require all granted
</Directory>
</VirtualHost>
നിങ്ങൾ യഥാർത്ഥ ഫോൾഡറിലേക്ക് ആക്സസ് നൽകേണ്ടതുണ്ട്