I use digital ocean LAMP, and have checked this post. https://discuss.flarum.org/d/1869-solving-404-not-found-issues-on-apache
However, my case is I haven't finished installing flarum yet. I can visit the ip, and visit the index page in /var/www/html
.
Then I installed flarum in the same folder /var/www/html
, tried to visit ip/flarum/public
, hoping to finish the installation. I got stuck here every time with the same issue. No matter I am using the digital ocean LAMP or running a Virutalmin myself. 😅
By the way,
More background:
Module rewrite is enabled
I downgraded php 8 to 7.4(have check with php -v
), there is a phpinfo()
page. However, I cannot access it from ip/info.php
and when ls /var/www/html
, I cannot find the info.php
I can access this sudo nano /etc/php/7.4/apache2/php.ini
I run sudo nano /etc/apache2/sites-available/domain.conf
[the following codes, updated after Katos's reply, I add html before flarum] to change domain.com
to localhost
UseCanonicalName On
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/flarum/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<Directory "/var/www/html">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
- I did
systemctl restart apache2
after making all the changes.
Then check my configuration file against any syntax errors, it returns with:
Syntax OK
Yet, I believe the first step of download flarum from composer is completed. In the terminal, it says
- Downloading flarum/flarum (v1.0.0)
- Installing flarum/flarum (v1.0.0): Extracting archive
Created project in /var/www/html/flarum
....
- Installing flarum/tags (v1.0.3): Extracting archive
53 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
70 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
I really need some help here.