Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache reload error #1950

Closed
abers opened this issue Apr 19, 2016 · 9 comments
Closed

Apache reload error #1950

abers opened this issue Apr 19, 2016 · 9 comments
Assignees
Milestone

Comments

@abers
Copy link

abers commented Apr 19, 2016

Just run into an error when trying to host wallabag through apache. After setting up the virtual host and running sudo service apache2 reload I get the following:

Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.

systemctl status apache2.service returns:
apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: active (exited) (Result: exit-code) since Tue 2016-04-19 12:44:36 BST; 4min 6s ago
Process: 16000 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 16456 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
Process: 16010 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)

and journalctl -xn:
No journal files were found.

Error.log is empty however.

@abers
Copy link
Author

abers commented Apr 19, 2016

Right purging apache2 and reinstalling fixed that issue and it now reloads fine. However, the virtual host still doesn't work for me. When it says "Assuming you install wallabag in the /var/www/wallabag folder" since I wasn't prompted at any point during the install I assumed that the git folder is also the install folder. Therefore, I created a symbolic link /var/www/wallabag to the git folder. That though doesn't seem to be right, including when uncommenting the lines from the suggest virtual host layout to follow symbolic links - does wallabag install somewhere else that I need to link to or am I doing something else wrong?

@tcitworld
Copy link
Member

The provided virtual host file is just an example, you need to adapt it to your configuration. Please head over at https://gitter.im/wallabag/wallabag for support.

@abers
Copy link
Author

abers commented Apr 20, 2016

Right so after after switching back to lighttpd I can get the site to sort of work. Going to the IP address (with directory listing enabled) shows the directory but clicking app.php loads wallabag. So with directory listing disabled just need to append app.php at the end of the URL and it works. Will keep exploring config options to see if I can get it to work normally, I am guessing some additional rewrite rule is needed.

Edit: Damn, it seems to work OK testing connection on Android app but get Error loading feed : request unsuccessful; respond code: 404, respsone message: Not found when trying to refresh my poche.

lighttpd.conf is:

server.modules = (
"mod_fastcgi",
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_rewrite",
)

server.document-root = "/var/www/wallabag/web"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
server.follow-symlink = "enable"

index-file.names = ( "index.php", "index.html", "index.lighttpd.html")
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )

include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

dir-listing.activate = "disable"

@abers
Copy link
Author

abers commented Apr 20, 2016

OK getting closer to a solution. I now have it working normally on the web without needing to add app.php. Change index-file.names to:

index-file.names = ( "app.php", "index.php", "index.html", "index.lighttpd.html")

And add rewrite:

url.rewrite-if-not-file = (
"^/(mw-)?config/?" => "$0",
"^/([^?])(?:?(.))?" => "/app.php?$1&$2",
"^/([^?]*)" => "/app.php?=$1",
"^/wiki$" => "/app.php",
)

However, the Android app still hates the URL for some reason. Test login works fine but still get 404 on refreshing poche.

@nicosomb
Copy link
Member

Is that OK for the web app? If yes, you can close this issue.

About Android application, you can open a new issue here: https://github.com/wallabag/android-app

@abers
Copy link
Author

abers commented Apr 20, 2016

Actually it might still be a web app error. Just went through all the pages and they all work except for config - which gives 404 error,

@abers
Copy link
Author

abers commented Apr 20, 2016

And as soon as I wrote that I saw the remaining issue:

"^/(mw-)?config/?" => "$0",

Can be removed - it was left over from an example file I was editing from. After changing that both web and android work.

@tcitworld
Copy link
Member

Reopening in order not to forget to add the lighttp config file to the documentation.

@nicosomb nicosomb added this to the 2.0.4 milestone Apr 23, 2016
@j0k3r
Copy link
Member

j0k3r commented Apr 24, 2016

Can be close in favor of #1931

@j0k3r j0k3r closed this as completed Apr 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants