Closed MaxIhme closed 10 months ago
but you can change the hosts file:
sudo vim /etc/hosts/ and put in: 127.0.0.1 example.com save and exit. http://example.com:8080 will now be redirected to us but http://example.com/ not!
@MaxIhme you started "./webserv web.conf" ?
I cannot use this config file:
all config files are in conf/
How do you test this???
Edit Max: look at the first post. put host example.com; in the server directive and start webserve with that config. in bash should come: Finished creating the ports: ........ example.com ......
and then you can do the second post.. modify the hosts file on your system and put "127.0.0.1 example.com" in and save it.
Then you start webserve and put in the browser http://example.com:8000 and our website should come
for me (as describes in the top comments) runs ok
curl --resolve example.com:8000:127.0.0.1 http://example.com:8000
config: server { host example.com; ... } server { host another_example.com; ... }
server says: Host: example.com ...succesfully created!... Host: another_example.com ...succesfully created!...
our server is not doing anything more. It's only looking to the right ports -> the hostnames are irrelevant.