Versionsunterschiede von Test Server
17 | %% sudo zypper install apache2 %% | 17 | %% sudo zypper install apache2 %% |
---|---|---|---|
18 | 18 | ||
19 | By default, Apache will not automatically start after installation. You can start it with: | 19 | By default, Apache will not automatically start after installation. You can start it with: |
20 |
%% s |
20 | %% systemctl start apache2.service %% |
21 | 21 | ||
22 | Check its status: | 22 | Check its status: |
23 |
%% s |
23 | %% sudo systemctl status apache2 %% |
24 | file:apache2_activerunning.png | 24 | file:apache2_activerunning.png |
25 | We can see from the screenshot that Apache is running and auto start enabled. | 25 | We can see from the screenshot that Apache is running and auto start enabled. |
26 | 26 | ||
… | … | … | … |
31 | %% Server version: Apache/2.4.57 (Linux/SUSE) | 31 | %% Server version: Apache/2.4.57 (Linux/SUSE) |
32 | Server built: 2023-04-07 13:20:25.000000000 +0000 %% | 32 | Server built: 2023-04-07 13:20:25.000000000 +0000 %% |
33 | 33 | ||
34 |
Now change into DocumentRoot, |
34 | Now change into DocumentRoot, |
35 | 35 | ||
36 | %%cd /srv/www/htdocs/ | 36 | %% cd /srv/www/htdocs/%% |
37 | echo "<h1>It Works!</h1>" > index.html %% | ||
38 | 37 | ||
38 | create index.html file and put the following text into the file. | ||
39 | %% echo -e '<html>\n<html>\n\t<body>\n\t\t<h1>It Works!</h1>\n\t</body>\n</html>' > index.html%% | ||
39 | 40 | ||
40 |
Then in your browserâs address bar, type the IP address |
41 | Then in your browserâs address bar, type the IP address 127.0.0.1 or localhost in the browser address bar. You should see the âIt works!â Web page which means Apache Web server is running correctly. |
41 | 42 | ||
42 | If you are installing LAMP on your local openSUSE Leap 15.1 machine, just type 127.0.0.1 or localhost in the browser address bar. | 43 | file:apache2_works.png |
43 | |||
44 | |||
45 | 44 | ||
46 | ===Local Testserver Configuration=== | 45 | ===Local Testserver Configuration=== |
46 | Configuring Apache manually involves editing plain text configuration files as user root. | ||
47 | |||
47 | And enable auto start at boot time with: | 48 | And enable auto start at boot time with: |
48 | %% sudo systemctl enable apache2 %% | 49 | %% sudo systemctl enable apache2 %% |
49 | 50 |